from collections import defaultdict MOD = 10 ** 9 + 7 N, K = map(int, input().split()) A = list(map(int, input().split())) A.sort() dic = defaultdict(int) dic[(0, 0)] = 1 ans = 0 for i, a in enumerate(A): tmp = pow(2, N - i - 1, MOD) for (x, y), v in list(dic.items()): if y + a >= K * (x + 1): ans += v * tmp ans %= MOD elif y + a + 100 * (N - i - 1) < K * (x + N - i): continue else: dic[(x + 1, y + a)] += v dic[(x + 1, y + a)] %= MOD print(ans)