n,a,b=list(map(int,input().split()))

print((max(0,(n-2)*(b-a)+1)))
n,a,b=list(map(int,input().split()))

n-=2;print((max(b*n-a*n+1,0)))
n, a, b = list(map(int, input().split()))
print((max(0, (n - 2) * (b - a) + 1)))

n, a, b = list(map(int, input().split()))
n -= 2
print((max(b * n - a * n + 1, 0)))

-print((max(0, (n - 2) * (b - a) + 1))) +n -= 2 +print((max(b * n - a * n + 1, 0)))