import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = println(solve(new Scanner(System.in)))

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    val N = sc.nextInt
    val A = Array.fill(N)(sc.nextInt)

    val s = (0 until N).map { i =>
      var sum = 0
      var j = 0
      while (i + j < N && sum + A(i + j) == (sum ^ A(i + j))) {
        sum += A(i + j)
        j += 1
      }
      j
    }
    s.sum.toString
  }
}
