#include <iostream>
using namespace std;

int main () {
    int n, d, k, i = 1, s = 1;
    cin >> n >> d >> k;
    while(k > 0){
        if(i < n){
            i -= n;
        }
        s += i + d;
        i += d;
        k--;
    }
    cout << abs(s);

    return 0;
}
