open System

let line = Console.ReadLine().Split(' ')
let N, A, B = int line.[0], int line.[1], int line.[2]

let max = A + (N - 1) * B
let min  = A * (N - 1) + B

if N = 1 && not (A = B) then
    Console.WriteLine(0)
else
    if A <=  B then
        Console.WriteLine(max - min + 1)
    else
        Console.WriteLine(0)
