import Control.Monad
import qualified Data.Sequence as S

check [] _ = []
check (x:xs) seq
    | S.elemIndexL x seq == Nothing = x : check xs (x S.<| seq) 
    | otherwise                     = check xs seq

toInt x = read x :: Int

main = do
    n <- readLn
    s <- replicateM n getLine
    print $ length $ check s S.empty