#include <iostream>
using namespace std;
int main ()
{
    int n, d, k, s, p;
    s = 0;
    cin>>n>>d>>k;
    p = 1;
    while (k > 0)
    {
        if (p + d > n && d < n) 
        {
            int o = (p + d) - n; 
            p = o; 
            s = s + p;
            k = k - 1;
        }
        else
        {
            p = d + p;
            s = s + p;
            k = k - 1; 
        }
        if (p > n)
        {
            int o = (d + 1) - n;
            p = n + o + 1;
            s = s + p;
            k = k - 1;
        }
        else
        {
            p = d + p; 
            s = s + p; 
            k = k - 1; 
        }
    }

    cout<<s;
    return 0;
}
