import Data.List

main = do
  n <- readLn :: IO Int
  ss <- lines <$> getContents :: IO [String]
  putStrLn $ show $ count $ sort ss


foldlPairwise :: (a -> b -> b -> a) -> a -> [b] -> a
foldlPairwise f a l = foldl (\a (z, x) -> f a z x) a $ zip l (tail l)

count ss = foldlPairwise step 1 ss
    where step a z x = a + if z == x then 0 else 1
