{-# LANGUAGE TypeApplications #-}
import Control.Monad
import Control.Applicative
import Data.Maybe
import qualified Data.List as List
import qualified Data.ByteString.Char8 as BS

getNList n = replicateM (fromIntegral n) BS.getLine

main :: IO ()
main = do
  n <- read @Int <$> getLine
  c <- getNList n
  print $ List.length $ List.nub c
