#include<iostream>
using namespace std;
int main()
{
int n,d,k;
cin>>n>>d>>k;
int sumi = 0;
int jump = 1;
for(int i = 0 ;i<=k;i++){
    if(jump>n){
        jump = jump-n;
    }
    sumi += jump;
    jump+=d;
}

cout<<sumi;
return 0;
}
