N, A, B = map(int, input().split()) ansa = A*(N-1)-B*N ansb = -A*(N-1)-B*(N % 2) ansc = -A*(N-3)-B*2 if N % 2: print(min(ansa, ansb)) else: print(min(ansa, ansb, ansc))