#include<iostream>
using namespace std;

int main(){
    int n, d, k, sum=0, ch1, ch;
    cin>>n>>d>>k;
    ch1=1+d;
    if(ch1>=n){
        ch=ch-n;
        if(ch=0){
            sum++;
        }
        sum=sum+ch;
    }
    for(int z=0; z<=k-1; z++){
        if(sum>n){
            ch=sum-n;
            sum=ch1;
            sum=sum+ch;
        }
        else
        {
            sum=sum+ch1;
        }
    }
    cout<<sum+1+ch1;
    return 0;
}