import Data.List main = getLine >> getLine >>= print . length . filter (\x -> length x == 1) . group . sort . words