#include <bits/stdc++.h>
const int N = 20010;
const int mod = 1000000007;
int n;
int a[1010];
long ans = 0;
int dp[1010][N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= N; j++) dp[i][j] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < N; j++) {
      int k = j - a[i];
      if (k < 0) k = N;
      int p = j + a[i];
      if (p > 20000) p = N;
      dp[i][j] = dp[i - 1][k] + dp[i - 1][p];
      dp[i][j] %= mod;
      if ((k == 10000) || (p == 10000)) dp[i][j]++;
    }
  for (int i = 2; i <= n; i++) ans = (ans + dp[i][10000]) % mod;
  printf("%ld", ans);
  return 0;
}
