module Memoizable
	def memoize(name)
		original = "__original_#{name}__"
		([Class, Module].include?(self.class) ? self : self.class).class_eval {
			alias_method(original, name)
			private(original)
			cache = {}
			define_method(name){|*args|
				cache[args] ||= send(original, *args)
			}
		}
	end 
end

include Memoizable 
def f(w, i, unused)
	return 0 if w < 0
	if i == $hobbits.size
		return w < unused ? 1 : 0
	end
	(f(w - $hobbits[i], i+1, unused) + f(w, i+1, $hobbits[i])) % 1_000_000_007
end

memoize :f

n, w = gets.split.map &:to_i
$hobbits = (1..n).map{ gets.to_i }.sort.reverse

p f(w, 0, Float::INFINITY)