#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1000000007; int main() { int N, K; cin >> N >> K; vector A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } int LIM = N * 100; ll dp[K + 1][N * 100 + 1]; memset(dp, 0, sizeof(dp)); dp[0][0] = 1; for (int i = 0; i < N; ++i) { int a = A[i]; for (int k = i; k >= 0; --k) { for (int j = 0; j <= 100 * i; ++j) { if (dp[k][j] == 0) continue; int n = min(LIM, j + a); dp[k + 1][n] += dp[k][j]; dp[k + 1][n] %= MOD; } } } ll ans = 0; for (int i = 1; i <= N; ++i) { for (int j = i * K; j <= 100 * N; ++j) { ans += dp[i][j]; ans %= MOD; } } cout << ans << endl; return 0; }