#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> A(n, 0);
  long long i;
  for (i = 0; i < n; i++) cin >> A[i];
  if (n == 1) {
    cout << "0";
    return 0;
  }
  long long sum = A[0];
  for (i = 1; i < n; i++) {
    sum += A[i];
    A[i] += A[i - 1];
  }
  long long count = 0;
  long long left = 0;
  long long right = 0;
  for (i = 1; i < n; i++) {
    left = A[i - 1];
    right = sum - left;
    if (right == left) count++;
  }
  cout << count;
  return 0;
}
