#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MAXN = 2e5 + 10;
int s[MAXN];
int main() {
  int n, a;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a);
    s[i] = s[i - 1] + (i & 1 ? a : -a);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (s[i - 1] == s[n] - s[i]) ans++;
  cout << ans << endl;
  return 0;
}
