#include <bits/stdc++.h>
using namespace std;
int sum[200010];
int main() {
  int n, temp;
  while (cin >> n) {
    sum[0] = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &temp);
      if (i % 2 == 0) {
        sum[i] = sum[i - 1] + temp;
      } else {
        sum[i] = sum[i - 1] - temp;
      }
    }
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (sum[i - 1] == sum[n] - sum[i]) {
        cnt++;
      }
    }
    cout << cnt << endl;
  }
  return 0;
}
