#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int even[maxn], odd[maxn];
int main() {
  int a[maxn], n, ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i & 1) {
      odd[i] = a[i];
    } else {
      even[i] = a[i];
    }
    odd[i] += odd[i - 1];
    even[i] += even[i - 1];
  }
  int sum1 = 0, sum2 = 0;
  for (int i = 1; i <= n; i++) {
    sum1 = odd[i - 1] + even[n] - even[i];
    sum2 = even[i - 1] + odd[n] - odd[i];
    if (sum1 == sum2) {
      ans++;
    }
  }
  cout << ans;
}
