#include <bits/stdc++.h>
using namespace std;
template <class T>
void dbs(string str, T t) {
  cerr << str << " : " << t << "\n";
}
template <class T, class... S>
void dbs(string str, T t, S... second) {
  int idx = str.find(',');
  cerr << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), second...);
}
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class S, class T>
ostream& operator<<(ostream& os, const map<S, T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
void prc(T a, T b) {
  cerr << "[";
  for (T i = a; i != b; ++i) {
    if (i != a) cerr << ", ";
    cerr << *i;
  }
  cerr << "]\n";
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> V(n + 1, 0);
  for (long long int(i) = (long long int)(1); (i) <= (long long int)(n);
       (i)++) {
    cin >> V[i];
    V[i] += V[i - 1];
  }
  if (V[n] % 2 != 0)
    cout << "0\n";
  else {
    long long int count = 0;
    for (long long int(i) = (long long int)(1); (i) <= (long long int)(n - 1);
         (i)++) {
      if (V[i] == V[n] / 2) count++;
    }
    cout << count << endl;
  }
  return 0;
}
