#include<iostream>
using namespace std;
int main()
{
    int n, d, k, position = 1, sum = 1;
    cin>>n>>d>>k;
    for(int c = 1; c<=k; c++)
    {
        if(position+d>n)
        {
            position=position+d-n;
        }
        else
        {
            position+=d;
        }
        sum+=position;
    }
    cout<<sum;
    return 0;
}
