import sys input = sys.stdin.readline N, K = map(int, input().split()) a = list(map(int, input().split())) mod = 10 ** 9 + 7 a.sort() for i in range(N): a[i] -= K mn = [] zr = 0 pl = [] for x in a: if x < 0: mn.append(-x) elif x == 0: zr += 1 else: pl.append(x) ln = N * 100 dpmn = [0] * (ln + 1) dpmn[0] = 1 dppl = [0] * (ln + 1) dppl[0] = 1 for x in mn: for i in range(ln, -1, -1): if dpmn[i]: dpmn[i + x] += dpmn[i] dpmn[i + x] %= mod for x in pl: for i in range(ln, -1, -1): if dppl[i]: dppl[i + x] += dppl[i] dppl[i + x] %= mod for i in range(ln, 0, -1): dppl[i - 1] += dppl[i] dppl[i - 1] %= mod res = 0 for i in range(ln + 1): res += dppl[i] * dpmn[i] res %= mod print(res * pow(2, zr, mod) - 1 % mod)