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