#include using namespace std; using ll = long long; int main(){ ll n, a, b, c1, c2, ans = 1ll << 62; cin >> n >> a >> b; c1 = n / 2, c2 = n - c1; ll r = (n - 1) / 2; for(ll i = 0; i <= r; i++){ ans = min(ans, a * (- (i << 2) + n - 1) + b * (-n + (i << 1))); } cout << ans << '\n'; }