#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)); cout << ans << endl; return 0; }