#include <bits/stdc++.h>
using namespace std;
long long fac[2000005] = {0};
void factorial() {
  fac[0] = 1;
  fac[1] = 1;
  for (long long i = 2; i < 200005; i++)
    fac[i] = ((i % 1000000007) * (fac[i - 1] % 1000000007)) % 1000000007;
}
long long power(long long n, long long m) {
  long long p = 1;
  if (m == 0) return 1;
  p = (power(n, m / 2) % 1000000007);
  p = (p % 1000000007 * p % 1000000007) % 1000000007;
  return (m & 1 ? ((p % 1000000007 * n % 1000000007) % 1000000007)
                : (p % 1000000007));
}
long long ncr(long long n, long long r) {
  return ((fac[n] * power(fac[r], 1000000007 - 2)) % 1000000007 *
          power(fac[n - r], 1000000007 - 2)) %
         1000000007;
}
void ram5564() {
  long long n;
  cin >> n;
  long long a[n];
  long long sum1[n], sum2[n];
  memset(sum1, 0, sizeof(sum1));
  memset(sum2, 0, sizeof(sum2));
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) {
      sum1[i] = a[i];
      continue;
    }
    sum1[i] = sum1[i - 1] + a[i];
  }
  for (long long i = n - 1; i >= 0; i--) {
    if (i == n - 1) {
      sum2[i] = a[i];
      continue;
    }
    sum2[i] = sum2[i + 1] + a[i];
  }
  long long cnt = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (sum1[i] == sum2[i + 1]) ++cnt;
  }
  cout << cnt;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) ram5564();
  return 0;
}
