#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, sum = 0;
  vector<pair<int, int>> v(1e5);
  map<int, int> ways;
  scanf("%d", &x);
  for (int i = 0; i < x; i++) {
    scanf("%d", &y);
    sum += y;
    v[i] = pair<int, int>(y, sum);
    if (i != x - 1) ways[sum]++;
  }
  printf("%d\n", ((sum % 2) ? 0 : ways[sum / 2]));
  return 0;
}
