import Control.Applicative
main = do
  [n,a,b] <- map read . words <$> getLine :: IO [Int]
  print $
    if a > b then 0
    else if a == b then 1
    else
      if n == 1 then 1 else (b*(n-1)+a) - (a*(n-1)+b) + 1
