N, A, B = map(int, input().split()) if A < B: print(A * (N - 1) - B * N) elif A > B: print(- A * (N - 1) - B * (N % 2)) else: print(- B * N)