N,A,B = map(int,input().split()) if N%2==0: pppp = A*(N-1)-B*N pmpm = -A*(N-1) pmpp = -A*(N-2)+A-2*B print(min(pppp,pmpm,pmpp)) else: pppp = A*(N-1)-B*N pmpm = -A*(N-1)-B print(min(pppp,pmpm))