#include <bits/stdc++.h>
using namespace std;
long long arr[200005];
long long s1[200005];
long long s2[200005];
int main() {
  long long q, n, a, b;
  cin >> n;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", arr + i);
    sum += arr[i];
    if (i % 2) {
      s1[i] = arr[i] + s1[i - 1];
      s2[i] = s2[i - 1];
    } else {
      s1[i] = s1[i - 1];
      s2[i] = arr[i] + s2[i - 1];
    }
  }
  long long an = 0;
  for (int i = 1; i <= n; i++) {
    long long a = 0, b = 0;
    a = s1[i - 1] + (s2[n] - s2[i]);
    b = s2[i - 1] + s1[n] - s1[i];
    an += (a == b);
  }
  cout << an << endl;
  return 0;
}
