import Data.List

main = do
  getLine
  as <- map read . words <$> getLine
  print (together as)

together as = (length (takeWhile (<= 2) das)) + 1
  where
    sas = sort as
    das = scanl1 (+) $ sort $ zipWith (-) (tail sas) sas


