#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 - 1) * (B - A) + B); cout << -ans << endl; }