#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int n;
  cin >> n;
  int even[200005] = {}, odd[200005] = {};
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    even[i] = even[i - 1];
    odd[i] = odd[i - 1];
    if (i % 2)
      odd[i] += x;
    else
      even[i] += x;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (even[i - 1] + odd[n] - odd[i] == odd[i - 1] + even[n] - even[i]) ans++;
  cout << ans;
}
