import Control.Applicative ((<$>))
import Data.List (group)

main :: IO ()
main = getLine >> solve <$> map read <$> words <$> getLine >>= print

solve :: [Int] -> Int
solve = (+1) . maximum . map length  . filter ((== 1) . head) . group

