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