module Main where
import Data.Set(empty,insert,delete,member,size)

main = interact $ printer . solver . parser
int = read :: String -> Int

printer = unlines . (:[]) . show
parser = map int . tail . words

solver as = result
  where
    setadd st a = if member a st then delete a st else insert a st
    v = foldl setadd empty as
    result = size v
