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