#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const int maxn = 100000 + 10;
ifstream fin("input.txt");
ofstream fout("output.txt");
long long dp[1100][20100], a[1010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    dp[i][10000 + a[i]] = 1;
    dp[i][10000 - a[i]] = 1;
    for (int j = 0; j < 20000; j++) {
      if (j >= a[i]) dp[i][j - a[i]] += dp[i - 1][j];
      dp[i][j + a[i]] += dp[i - 1][j];
      dp[i][j] %= mod;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + dp[i][10000]) % mod;
  cout << ans;
}
