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

if N == 1:

    print((1 if A==B else 0))

else:

    if A > B:

        print((0))

    else:

        m = A*(N-1)+B

        M = B*(N-1)+A

        print((M-m+1))

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

if A > B:

    print((0))

    exit(0)

if N == 1:

    if A != B:

        print((0))

    else:

        print((1))

else:

    print(((N-1)*B+A-(N-1)*A-B+1))

N, A, B = list(map(int, input().split()))
if N == 1:
    print((1 if A == B else 0))
else:
    if A > B:
        print((0))
    else:
        m = A * (N - 1) + B
        M = B * (N - 1) + A
        print((M - m + 1))

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

+if A > B: +    print((0)) +    exit(0) -    print((1 if A == B else 0)) -else: -    if A > B: +    if A != B: -        m = A * (N - 1) + B -        M = B * (N - 1) + A -        print((M - m + 1)) +        print((1)) +else: +    print(((N - 1) * B + A - (N - 1) * A - B + 1))