//#pragma GCC optimize ("-O3","unroll-loops") #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define REVERSE(v,n) reverse(v,v+n); #define VREVERSE(v) reverse(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define m0(x) memset(x,0,sizeof(x)) #define print(x) cout<P; const int MAX = 200020; int N, C, V; int dp[200020]; signed main() { cin.tie(0); ios::sync_with_stdio(false); cin >> N >> C >> V; REP(i, 200000)dp[i] = INF; dp[1] =0; dp[2] = C + V; FOR(i, 2, 3*N+1) { dp[i + 1] = dp[i] + V; } FOR(i, 2, N) { for (int j = i * 2; j < 3 * N; j += i) { dp[j] =min(dp[j], dp[i] + C + V * ((j / i)-1)); } } int ans = INF; FOR(i, N, 2 * N) { ans = min(ans, dp[i]); } print(ans); //REP(i, N + 1) { // pe(i)print(dp[i]); //} }