N, A, B = map(int, input().split()) answer = 10**18 # -1 1 -1 1 ... up = N // 2 down = N - up answer = min(answer, -A * (N - 1) - B * (down - up)) # 1 1 1 1 ... answer = min(answer, A * (N - 1) - B * N) # 1 -1 1 -1 ... 1 1 if N % 2 == 0: up = N // 2 - 1 down = N - up answer = min(answer, -A * (up * 2) + A - B * (down - up)) print(answer)