#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void out(T a) {
  int i = 0;
  char s[20];
  if (a == 0) s[i++] = '0';
  if (a < 0) putchar('-'), a = -a;
  while (a > 0) s[i++] = a % 10 + '0', a /= 10;
  --i;
  while (i >= 0) putchar(s[i--]);
  putchar(' ');
}
inline void out(char a) { putchar(a); }
inline void out(const char *s) {
  int n = strlen(s);
  for (int i = 0; i < n; i++) putchar(s[i]);
  putchar(' ');
}
inline void out(char *s) {
  int n = strlen(s);
  for (int i = 0; i < n; i++) putchar(s[i]);
  putchar(' ');
}
inline void out(string s) {
  int n = s.length();
  for (int i = 0; i < n; i++) putchar(s[i]);
  putchar(' ');
}
inline void out(double n) { printf("%.15lf ", n); }
inline void out() { putchar('\n'); }
inline void in(double &n) { scanf("%lf", &n); }
template <typename T>
inline void in(T &n) {
  register T c = getchar();
  n = 0;
  bool neg = false;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') neg = true, c = getchar();
  for (; (c > 47 && c < 58); c = getchar()) n = (n << 1) + (n << 3) + c - 48;
  if (neg) n *= -1;
}
inline void in(char &a) {
  while (a < 33) a = getchar();
}
inline void in(char *s) {
  register char c = 0;
  register int i = 0;
  while (c < 33) c = getchar();
  while (c != '\n') s[i] = c, c = getchar(), i++;
  s[i] = '\0';
}
inline void in(string &s) {
  register char c = 0;
  s = "";
  while (c < 33) c = getchar();
  while (c != '\n') s += c, c = getchar();
}
const int MAXN = 3e5 + 5;
int a[MAXN], cnt[2][1 << 20];
int main() {
  int n;
  in(n);
  a[0] = 0;
  for (int i = 1; i <= n; i++) in(a[i]);
  long long ans = 0;
  cnt[1][a[0]]++;
  for (int i = 1; i <= n; i++) {
    a[i] ^= a[i - 1];
    ans += (i & 1) ? cnt[0][a[i]] : cnt[1][a[i]];
    if (i & 1)
      cnt[0][a[i]]++;
    else
      cnt[1][a[i]]++;
  }
  out(ans), out();
  return 0;
}
