#include <iostream>
using namespace std;
int main()
{
    int n, d, k, sb = 1, num = 1;
    cin >> n >> d >> k;
    if(d+1 == n+1){
        cout << k + 1;
    } 
    for(int i = 1; i <= k; i++){
        num += d;
        if(num/n > 0){
            sb += num%n;
            num = num%n;
        } else {
            sb += num%n;
        }
    }
    cout << sb + n << endl;



    return 0;
}