import Control.Monad
import Text.Printf
import Control.Applicative
import Data.Bits

main :: IO()
main = do
  n <- getLine
  a <- map read . words <$> getLine
  printf "%s" $ slv a

slv :: [Integer] -> String 
slv a = show $ calc tplScan (tail tplScan) 0
  where xorScan = scanl xor 0 a
        sumScan = scanl (+) 0 a
        tplScan = zip xorScan sumScan

calc :: [(Integer, Integer)] -> [(Integer, Integer)] -> Integer -> Integer
calc (t:tt:ts) [] ret = calc (tt:ts) ts ret
calc (t:ts) [] ret = ret
calc (t:ts) (s:ss) ret | xorVal == sumVal = calc (t:ts) ss (ret+1)
                       | otherwise = calc (t:ts) ss ret
  where xorVal = xor (fst s) (fst t)
        sumVal = (snd s) - (snd t)