import           Control.Applicative
import           Control.Monad
import           Control.Monad.Trans.State.Strict
import qualified Data.ByteString.Lazy.Char8       as B
import           Data.Char
import qualified Data.IntSet                      as S

int = StateT $ B.readInt . B.dropWhile isSpace
parse s = maybe (error "Parse Failed") fst . runStateT s <$> B.getContents

main :: IO ()
main = do
  n <- parse int
  as <- parse $ replicateM n int
  print $ evalState (solve as) S.empty

solve :: [Int] -> State (S.IntSet) Int
solve [] = S.size <$> get
solve (a:as) = do
  s <- get
  put $ if a `S.member` s
    then S.delete a s
    else S.insert a s
  solve as
