n, a, b = map(int, input().split()) if 2*a <= b: print((n-1)*a-n*b) elif b < a and n%2 == 0: print(-(n-3)*a-2*b) else: print(-(n-1)*a-n%2*b)