main :: IO ()
main = do
  w <- words <$> getLine :: IO [String]
  print $ length $ rmdpl w
  
rmdpl :: [String] -> [String]
rmdpl [] = []
rmdpl (x:xs) 
   | x `elem` xs = rmdpl xs
   | otherwise   = x : rmdpl xs

