#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  long long int i;
  cin >> n;
  std::vector<long long int> v;
  long long int s = 0;
  for (long long int i = 0; i < n; i++) {
    long long int val;
    cin >> val;
    s += val;
    if (i != (n - 1)) v.push_back(s);
  }
  if (s % 2 == 1) {
    cout << 0 << endl;
    return 0;
  }
  long long int c = 0;
  for (i = 0; i < v.size(); i++) {
    if (v[i] == s - v[i]) c++;
  }
  cout << c << endl;
  return 0;
}
