func_code_string: #include <bits/stdc++.h>   using namespace std;   int dp[1002][20002];   int main() {     ios_base::sync_with_stdio;     int n, m, x, y, i, j, a;     cin >> n;     long long ans = 0;     for (i = 1; i <= n; i++) {       cin >> a;       dp[i][10000 + a]++;       dp[i][10000 - a]++;       for (j = 0; j < a; j++) {         dp[i][j] = dp[i - 1][j + a];       }       for (j = 20000; j > 20000 - a; j--) {         dp[i][j] = dp[i - 1][j - a];       }       for (j = a; j <= 20000 - a; j++) {         dp[i][j] = (dp[i - 1][j - a] + dp[i - 1][j + a]) % 1000000007;       }       dp[i][10000 + a] = (dp[i][10000 + a] + 1) % 1000000007;       ;       dp[i][10000 - a] = (dp[i][10000 - a] + 1) % 1000000007;       ans = (ans + dp[i][10000]) % 1000000007;     }     cout << ans;     return 0;   }   