import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	
	long n, k;
	{
		long[] tmp = readln.chomp.split.map!(to!long).array;
		n = tmp[0], k = tmp[1];
		}
	
	long[] as = readln.chomp.split.map!(to!long).array;
	
	long count = 0;
	for(int i = 0; i < as.length; i ++){
		bool[long] valueset = [0: 1];
		foreach(j, a; as){
			if(i != j){
				foreach(v; valueset.keys) if(v + a < k){
					valueset[v + a] = 1;
					}
				}
			}
		long[] keys = valueset.keys;
		keys.sort!("a > b")();
		if(keys[0] + as[i] < k) count += 1;
		}
	
	count.writeln;
	
	
	}