import Data.List main = getContents >>= print . length . filter ((==1).length) . group . sort . tail . words