main = do
  cs <- getContents
  let css = concatMap words $ tail $ lines cs
  print $ length $ mkList css []

mkList :: [String] -> [String] -> [String]
mkList [] ys = ys
mkList (x:xs) ys = if x `elem` ys
                     then mkList xs $ filter (fnc x) ys
                     else mkList xs (x : ys)

fnc :: String -> String -> Bool
fnc x y
  | x == y    = False
  | otherwise = True
