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