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