#include using namespace std; int main() { long long N, A, B; cin >> N >> A >> B; long long ans = max(A * (N - 1) + B * (N % 2), N * B - (N - 1) * A); ans = max(ans, (N - 3) * A + 2 * B); cout << -ans << endl; }