#include <bits/stdc++.h>
using namespace std;
const long long ma = 2e5 + 5;
long long n, a[ma], le[ma], chan[ma], res, l, c;
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    chan[i] = chan[i - 1];
    le[i] = le[i - 1];
    if (i % 2 == 0) {
      chan[i] += a[i];
    } else {
      le[i] += a[i];
    }
  }
  for (long long i = 1; i <= n; i++) {
    l = 0, c = 0;
    c = le[n] - le[i] + chan[i - 1];
    l = chan[n] - chan[i] + le[i - 1];
    if (l == c) {
      res++;
    }
  }
  printf("%lld", res);
  return 0;
}
