import Data.List

solve' xs xss = if null xs
	then xss
	else solve' (tail xs) (xss ++ [maximum (map (-(head xs)+) xs)])

solve (x1:xs:_) = length . last . group . sort $ solve' xs []

main = print . solve . map (map read) . map words . lines =<< getContents
