#include using namespace std; using ll = long long; int main(){ ll n, a, b, ans = 1ll << 62; cin >> n >> a >> b; auto f = [&](ll c1){ ll c2 = n - c1; if(c1 < 0 || c1 > n || c2 < 0 || c2 > n)return; ll d = min(2 * min(c1, c2), n - 1); ans = min(ans, a * (-d + (n - 1 - d)) + b * (c1 - c2)); }; for(ll i = 0; i <= 100; i++){ f(i); f(n - i); f(n / 2 + i); f(n / 2 - i); } cout << ans << '\n'; }