import std.stdio;
import std.ascii;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.random;
import std.regex;
import std.typecons;

int N, W;
int[] ws;
int[] A;

void input() {
    scanf("%d %d\n", &N, &W);
    ws = new int[N];
    foreach (ref w; ws) {
        scanf("%d\n", &w);
    }
    ws.sort!"a > b";
    A = new int[N + 1];
    A[0] = 0;
    foreach (i; 1 .. N + 1) {
        A[i] = A[i - 1] + ws[i - 1];
    }
}

const MOD = cast(int)(1e9 + 7);
int[10002][202] dp;

void main() {
    input;
    if (A[N] < W) {
        writeln(1);
        return;
    }
    dp[0][0] = 1;
    foreach (i; 0 .. N) {
        foreach (j; 0 .. W + 1) {
            dp[i + 1][j + ws[i]] += dp[i][j];
            dp[i + 1][j + ws[i]] %= MOD;
            if (j + (A[N] - A[i + 1]) > W - ws[i]) {
                dp[i + 1][j] += dp[i][j];
                dp[i + 1][j] %= MOD;
            }
        }
    }
    int ans = 0;
    foreach (i; 0 .. W + 1) {
        ans = (ans + dp[N][i]) % MOD;
    }
    writeln(ans);
}