// {{{ Templates #include #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; using pii = pair; using vi = vector; template ostream& operator<<(ostream& os, const vector& v) { os << "sz:" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = (ll)1e9 + 7LL; template constexpr T INF = numeric_limits::max() / 100; // }}} struct Info { int len; int clip; ll cost; }; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; ll C, V; cin >> C >> V; vector dp(2 * N + 1, INF); dp[1] = 0; for (int i = 1; i <= N; i++) { for (int d = 2; d * i <= 2 * N; d++) { dp[i * d] = min(dp[i * d], dp[i] + (d - 1) * V + C); } } ll mincost = INF; for (int i = N; i <= 2 * N; i++) { mincost = min(mincost, dp[i]); } cout << mincost << endl; return 0; }