#include <bits/stdc++.h>
using namespace std;
int numbers[200005];
int oddsum[200005], evensum[200005], sum[200005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> numbers[i];
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + numbers[i];
    oddsum[i] = oddsum[i - 1];
    evensum[i] = evensum[i - 1];
    if (i % 2 == 1)
      oddsum[i] += numbers[i];
    else
      evensum[i] += numbers[i];
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int a = oddsum[i - 1] + evensum[n] - evensum[i];
    int b = evensum[i - 1] + oddsum[n] - oddsum[i];
    if (a == b) ans++;
  }
  cout << ans << endl;
  return 0;
}
