#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int nums[n];
  int prefix_sum[n];
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
    if (i == 0) {
      prefix_sum[i] = nums[0];
    } else {
      prefix_sum[i] = nums[i] + prefix_sum[i - 1];
    }
  }
  int total_sum = prefix_sum[n - 1];
  if (total_sum % 2 != 0) {
    cout << 0;
    return 0;
  }
  map<int, int> freq;
  for (int i = 0; i < n - 1; i++) {
    int cur_sum = prefix_sum[i];
    if (freq.find(cur_sum) == freq.end()) {
      freq[cur_sum] = 1;
    } else {
      freq[cur_sum]++;
    }
  }
  cout << freq[total_sum / 2];
}
