#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1);
long long a[2 * int(1e5) + 5];
long long s[2 * int(1e5) + 5][2] = {0};
int ans = 0;
int n;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s[i][1] += s[i - 1][1];
    s[i][0] += s[i - 1][0];
    s[i][i % 2] += a[i];
  }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (s[i - 1][0] + s[n][1] - s[i][1] == s[i - 1][1] + s[n][0] - s[i][0])
      ans++;
  cout << ans;
  return 0;
}
