#include using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; i++) using ll = long long; int main(){ ll n, a, b; cin >> n >> a >> b; ll ans = -b*n + a*(n-1); ans = min(ans,-a*(n-1)-b*((n+1)/2)+b*(n/2)); if(n % 2 == 0 && n >= 4) ans = min(ans,(n-3)*a-2*b); cout << ans << endl; return 0; }