n, a, b = map(int, input().split()) ans1 = (n - 1) * a - b * n ans2 = (n - 1) * a + b * n ans3 = -(n - 1) * a - (n & 1) * b ans4 = -(n - 1) * a + (n & 1) * b print(min(ans1, ans2, ans3, ans4))