N, A, B = map(int, input().split()) # -1 1 -1 1 ... up = N // 2 down = N - up answer1 = -A * (N - 1) - B * (down - up) # 1 1 1 1 ... answer2 = A * (N - 1) - B * N print(min(answer1, answer2))