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