lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end require "big" n, k = read_line.split.map(&.to_i) a = read_line.split.map(&.to_big_i) puts [0, 1].repeated_permutations(n).select { |perm| perm.sum >= k }.flat_map { |perm| b = (0...n).select { |i| perm[i] > 0 }.map { |i| a[i] } [b.sum, b.reduce(1.to_big_i) { |acc, val| acc * val }] }.uniq.size