import Data.List

getLines :: Int -> IO [String]
getLines n
  | n == 0    = return []
  | otherwise = do
      x <- getLine
      xs <- getLines (n-1)
      return (x:xs)

main = do
  n <- readLn
  xs <- getLines n
  print $ length $ nub xs
