main :: IO()
main = do
  n <- getLine
  (a:as) <- map read . words <$> getLine
  putStrLn $ show $ slv as a 0 

slv :: [Int] -> Int -> Int -> Int
slv [] _ ret = ret
slv (a:as) val ret | val == a = slv as 10000 (ret + 1)
                   | otherwise = slv as a ret 