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