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

cout<<sumi;
return 0;
}