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