#include <bits/stdc++.h>
using namespace std;
long long odd[200005], even[200005];
int main() {
  long long n, t, x, y;
  cin >> n;
  long long ara[n + 3];
  long long sum = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> ara[i];
    sum += ara[i];
    if (i % 2 == 0) {
      even[i] = even[i - 1] + ara[i];
      odd[i] = odd[i - 1];
    } else {
      odd[i] = odd[i - 1] + ara[i];
      even[i] = even[i - 1];
    }
  }
  for (int i = 1; i <= n; i++) {
    long long one = odd[i - 1];
    one += (even[n] - even[i]);
    long long two = sum - (one + ara[i]);
    if (one == two) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
