import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Data.List

solve :: [Int] -> [Int]
solve [_] = []
solve (x1:x2:xs) = xx : solve (x2:xs)
  where
    xx | x1 < x2  = 1
       | x1 > x2  = 2
       | x1 == x2 = 0

main :: IO ()
main = do
    _ <- getLine
    a <- map (fst . fromJust . BS.readInt)
        . BS.words <$> BS.getLine :: IO [Int]
    let ga = map head . group . filter (/=0) $ solve a
        a1 = length $ filter (==1) ga
        a2 = length $ filter (==2) ga
    print $ 1 + max a1 a2