import std.stdio, std.conv, std.string, std.array, std.algorithm;

bool[5000] mark;
int n;
int k;
ulong[] as;

void find_subset(ulong sum, size_t idx, size_t[] marked)
{
    if (idx >= n) return;

    find_subset(sum, idx+1, marked);

    sum += as[idx];
    if (sum >= k) {
        mark[idx] = true;
        foreach (m; marked) mark[m] = true;
        return;
    }

    find_subset(sum, idx+1, marked ~ idx);
}

void main()
{
    auto nk = readln.chomp.split(" ").map!(to!int).array;
    n = nk[0];
    k = nk[1];
    as = readln.chomp.split(" ").map!(to!ulong).array.sort!"a > b".array;

    find_subset(0, 0, []);

    writeln(n - mark[0..n].count!"a");
}