N,A,B=map(int,input().split()) ans=A*(N-1) - B*N if N%2==0: ans1 = -A * (N-1) else: ans1 = -A * (N-1) - B print(min(ans, ans1))