#include #include #include #include using namespace std; int main() { int n, c, v; cin >> n >> c >> v; vector dp(n * 2 + 1, 1e9); dp[1] = 0; for (int i = 1; i < dp.size(); i++) { for (int j = i * 2; j < dp.size(); j += i) { dp[j] = min(dp[j], dp[i] + c + (j - i) / i * v); } } int ans = 1e9; for (int i = n; i < dp.size(); i++) { ans = min(ans, dp[i]); } cout << ans << endl; }