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