#include <iostream>
using namespace std;
int main()
{
    long long n,d,k,sum=1,next=1;
    cin>>n;
    cin>>d;
    cin>>k;
    if(n==1)
    {
        sum=sum+k*1;
    }
    else
    {
        while(k!=0)
        {
            next=next+d;
            if(next>n)
            {
                next=next-n;
            }
            sum=sum+next;
            k--;
        }
    }
    cout<<sum<<endl;
    return 0;
}