#include "bits/stdc++.h" using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair const int inf = 1000000001; const ll INF = 1e16; #define MOD 1000000007 #define mod 1000000009 #define pi 3.14159265358979323846 #define Sp(p) cout<> n; cin >> c >> v; vl dp(2*n-1,INF); dp[0] = dp[1] = 0; ll m; for (i = 1; i < n ; i++) { for (j = i * 2; j <= 2 * n - 2; j += i) { dp[j] = min(dp[j], dp[i] + c + v*(j - i) / i); } } m = INF; for (i = n; i <= 2 * n - 2; i++) { m = min(m, dp[i]); } cout << m << endl; }