#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  long long sum = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], sum += a[i];
  if (sum % 2 == 1) cout << 0, exit(0);
  int ans = 0;
  long long f = 0;
  for (int i = 1; i < n; i++) {
    f += a[i];
    if (sum - f == f) ans++;
  }
  cout << ans;
  return 0;
}
