#include <bits/stdc++.h>
using namespace std;
long long md = 1000000007;
long long res[20001];
long long tmp[20001];
int mid = 10000;
long long get_val(int ind) { return res[mid + ind]; }
void set_val(int ind, long long val) { res[mid + ind] = val; }
void add_val(int ind, long long val) {
  tmp[mid + ind] += md + val;
  while (tmp[mid + ind] >= md) tmp[mid + ind] -= md;
}
int main() {
  memset(res, 0, sizeof(res));
  long long answ = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int val;
    scanf("%d", &val);
    memset(tmp, 0, sizeof(tmp));
    set_val(0, (get_val(0) + 1) % md);
    for (int j = -10000; j <= 10000; ++j) {
      if (!get_val(j)) continue;
      long long ttt = get_val(j);
      add_val(j - val, ttt);
      add_val(j + val, ttt);
    };
    memcpy(res, tmp, sizeof(tmp));
    answ += get_val(0);
  }
  cout << (answ % md) << endl;
  return 0;
}
