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

void main()
{
    auto nk = readln.split.to!(int[]);
    auto N = nk[0];
    auto K = nk[1];

    auto AS = readln.split.to!(long[]);
    sort!"a < b"(AS);

    int cnt;
    foreach (i, a; AS) {
        auto s = a;
        foreach (j, b; AS) {
            if (i == j) continue;
            if (s >= K) break;
            s += b;
        }
        if (s < K)
            ++cnt;
        else if (s - a >= K) {
            bool need;
            foreach (j, b; AS) {
                if (i == j) continue;
                s -= b;
                if (s < K) break;
                if (s - a < K) {
                    need = true;
                    break;
                }
            }
            if (!need) ++cnt;
        }
    }
    writeln(cnt);
}