main = do
  n <- readLn :: IO Int
  a <- (return . map (read::String->Int) . words) =<< getLine
  print $ f a 1 0 0
  where
    f a n i m | i == length a = m
              | a!!i == n = f a (n+1) (i+1) m 
              | otherwise = f a n (i+1) (m+1)
