object Main extends App {
	val n = scala.io.StdIn.readInt
	var s = scala.io.StdIn.readLine.split(" ").map(_.toLong)

	var cnt = n
	var tp1 = 0L
	var tp2 = 0L
	var max = 0
	var j = 0

	for(i<-0 until n){
		tp1 = s(i)
		tp2 = tp1
		j = i+1
		while(test(tp1) >= test(tp2) && j < n){
			tp1 = tp1 ^ s(j)
			tp2 = tp2 + s(j)
			j += 1

			if(tp1 == tp2) cnt += 1
		}
	}	

	println(cnt)

	def test(x: Long): Int = {
		var j = 20

		if(x == 0){
			return 0
		}

		while(((0x1 << j) & x) >> j != 0x1){
			j -= 1
		}

		return j + 1
	}
	
}
