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