import Control.Applicative
import Control.Monad
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Data.List
import Data.Set (Set)
import qualified Data.Set as S

main :: IO ()
main = do
  n <- readLn
  solve <$> replicateM n B.getLine >>= print

solve :: [ByteString] -> Int
solve bs = S.size $ foldl' f S.empty bs
  where
    f st s = S.insert s st
