#include #include using namespace std; void chmin(int &a, int x){ if(a > x) a = x; } int main(){ int n; cin >> n; int c, v; cin >> c >> v; vector cost(n*2+10, 1001001001); cost[1] = 0; for(int i = 1; i <= n; i++){ for(int j = 2; i*j <= n*2; j++){ chmin(cost[i*j], cost[i]+c+v*(j-1)); } } for(int i = n*2; i >= n; i--) chmin(cost[i], cost[i+1]); cout << cost[n] << endl; return 0; }