def main(): N, A, B = map(int, input().split()) if 4*A-2*B <= 0: print((N-1)*A - N*B) return if N % 2 == 1: print(-(N-1)*A - B) else: print(-(N-1)*A) if __name__ == "__main__": main()