N, A, B = map(int, input().split()) ans = - B * N + A * (N - 1) - max(0, 2 * A - B) * 2 * ((N - 1)//2) - max(0, A - B) * 2 * (1 - N % 2) print(ans)