N,A,B = list(map(int,input().split()))

if A>B or (N==1 and A!=B): print((0))

elif A==B or N==2: print((1))

else:

    N-=2

    print((B*N-A*N+1))
N,A,B = list(map(int,input().split()))

if (N==1 and A!=B) or B-A<0:print((0))

else: print(((A-B)*(2-N)+1))
N, A, B = list(map(int, input().split()))
if A > B or (N == 1 and A != B):
    print((0))
elif A == B or N == 2:
    print((1))
else:
    N -= 2
    print((B * N - A * N + 1))

N, A, B = list(map(int, input().split()))
if (N == 1 and A != B) or B - A < 0:
    print((0))
else:
    print(((A - B) * (2 - N) + 1))

-if A > B or (N == 1 and A != B): +if (N == 1 and A != B) or B - A < 0: -elif A == B or N == 2: -    print((1)) -    N -= 2 -    print((B * N - A * N + 1)) +    print(((A - B) * (2 - N) + 1))