#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
long long ev[N], od[N];
vector<int> vi;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < (int)(n + 1); ++i) {
    int a;
    cin >> a;
    vi.push_back(a);
    if ((i - 1) % 2 == 0)
      ev[i] = ev[i - 1] + a, od[i] = od[i - 1];
    else
      od[i] = od[i - 1] + a, ev[i] = ev[i - 1];
  }
  int ans = 0;
  for (int i = 0; i < (int)(vi.size()); ++i) {
    long long os = (ev[n] - ev[i + 1]) + od[i];
    long long es = (od[n] - od[i + 1]) + ev[i];
    if (os == es) ++ans;
  }
  cout << ans << endl;
}
