#include <bits/stdc++.h>
using namespace std;
long long n;
long long A[1000007];
long long S[1000007];
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> A[i];
  S[0] = A[0];
  for (long long i = 1; i < n; ++i) S[i] = S[i - 1] + A[i];
  long long res = 0;
  for (long long i = 0; i < n - 1; ++i) {
    if (S[i] == (S[n - 1] - S[i])) ++res;
  }
  cout << res << endl;
  return 0;
}
