import Control.Applicative ((<$>)) import Control.Monad import Data.List import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B8 main :: IO () main = do getLine getl solve >>= print solve :: ByteString -> Int solve = length . filter f . group . sort . B8.words where f x = length x == 1 getl :: (ByteString -> a) -> IO a getl f = f <$> B8.getLine