C - When I hit my pocket...

C - When I hit my pocket...

#include <bits/stdc++.h>
 
#define rep(i,n) for(int i=0; i<(n); ++i)
#define repx(i,x,n) for(int i=x; i<(n); ++i)
#define fixed_setprecision(n) fixed << setprecision((n))
#define execution_time(ti) printf("Execution Time: %.4lf sec\n", 1.0 * (clock() - ti) / CLOCKS_PER_SEC);
#define pai 3.1415926535897932384
#define NUM_MAX 2e18
#define NUM_MIN -1e9
 
using namespace std;
using ll = long long;
using P = pair<int,int>;
template<class T> inline bool chmax(T& a, T b){ if(a<b){ a=b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b){ if(a>b){ a=b; return 1; } return 0; }

int main() {
    ll K, A, B;
    cin >> K >> A >> B;

    if(B-A>=2){
        ll d = min(K, A-1);
        ll ans = d + 1;
        K -= d;
        ans += K / 2 * (B - A);
        ans += K % 2;
        cout << ans << endl;
    }else{
        cout << K + 1 << endl;
    }

    return 0;
}