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