import Data.Bits

main = do
  n <- readLn :: IO Int
  as <- getLine >>= return . map read . words :: IO [Int]

  let
    sumSequence = scanl (+) 0 as
    xorSequence = scanl xor 0 as

  print $ length [1 | i<-[1..n], j<-[i..n], sumSequence!!j - sumSequence!!(i-1) == (xorSequence!!j) `xor` (xorSequence!!(i-1))]
