import Control.Monad
import Control.Applicative
import Data.List
import Data.Array

strToInt s = (read :: String -> Int) s

main = do

   n <- readLn :: IO Int
   an <- replicateM n readLn
   
   print (length (solve [] an))

solve :: [Int] -> [Int] -> [Int]
solve s [] = s
solve s (a:an) =  solve (f s a) an

f ::  [Int] -> Int -> [Int]
f [] a = [a]
f (s:sn) a = if (s == a)
               then sn
               else ([s] ++ (f sn a))
               
               