#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, rsum = 0, lsum = 0, res = 0;
  cin >> n;
  long long arr[n];
  queue<long long> q;
  for (int i = 0; i < n; i++) cin >> arr[i], lsum += arr[i], q.push(arr[i]);
  while (q.size() > 1) {
    lsum -= q.front();
    rsum += q.front();
    q.pop();
    if (lsum == rsum) res++;
  }
  cout << res;
  return 0;
}
