#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  a.resize(n, 0);
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 1; i < n; i++) a[i] += a[i - 1];
  long long N = a[n - 1];
  if (N & 1) {
    cout << 0 << endl;
    return 0;
  }
  N /= 2;
  long long ans = 0;
  for (long long i = 0; i < n - 1; i++)
    if (a[i] == N) ++ans;
  cout << ans << endl;
  return 0;
}
