#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  int o = 0, e = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i & 1)
      o += a[i];
    else
      e += a[i];
  }
  int oo = 0, ee = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1)
      o -= a[i];
    else
      e -= a[i];
    if (o + ee == e + oo) ans++;
    if (i & 1)
      oo += a[i];
    else
      ee += a[i];
  }
  cout << ans;
  return 0;
}
