import Data.Bits
import Data.Array

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

  let
    sumSequence = array (0,n) (zip [0..] (scanl (+) 0 as))
    xorSequence = array (0,n) (zip [0..] (scanl xor 0 as))

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