import           Control.Applicative
import           Data.List

main :: IO ()
main = do
  _ <- getLine
  boxes <- words <$> getLine
  let m = maximum $ (0:) $ fmap length $ filter ((=="1").head) $ group boxes
  print $ m+1

