import           Control.Monad.State
import qualified Data.ByteString.Char8        as B
import qualified Data.Vector                  as V
import qualified Data.Set                     as S

type Parser a = StateT B.ByteString Maybe a

parseInt :: Parser Int
parseInt = StateT $ B.readInt . B.dropWhile ((==) ' ')

readParser :: Parser a -> IO a
readParser p = maybe (error "parser error") fst . runStateT p <$> B.getLine

main :: IO ()
main = do
  n  <- readParser parseInt
  ss <- V.replicateM n B.getLine
  print $ solve ss

solve :: V.Vector B.ByteString -> Int
solve = S.size . V.foldr S.insert S.empty
