#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
const int mod = 1e9 + 7;
const int maxm = 10101;
int v[maxn];
int d[2][maxm * 2];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  int res = 0;
  int old = 1, now = 0;
  d[now][maxm] = 1;
  for (int i = 1; i <= n; i++) {
    swap(old, now);
    for (int j = v[i]; j < 2 * maxm - v[i]; j++) {
      d[now][j] = d[old][j - v[i]] + d[old][j + v[i]];
      if (j == maxm) d[now][j]++;
      d[now][j] %= mod;
    }
    res = (res + d[now][maxm] - 1) % mod;
  }
  cout << res << "\n";
}
