#include #include #include using namespace std; const int N = 50000; int n,c, v,dp[N+1]; int main() { memset(dp, 1, sizeof(dp)); dp[1] = 0; cin >> n >> c >> v; for (int i = 1; i <= n; i++) { for (int j = 2;; j++) { dp[min(j*i, n)] = min(dp[min(j*i, n)], dp[i] + c + v * (j - 1)); if (j*i >= n)break; } } cout << dp[n] << endl; return 0; }