from collections import defaultdict

n, a = list(map(int, input().split()))

x = list(map(int, input().split()))



dp = [defaultdict(int) for _ in range(n+1)]

dp[0][a] += 1



for i, x_i in enumerate(x):

    for p in list(dp[i].keys()):

        pk = p + a - x_i

        dp[i+1][pk] += dp[i][p]

        dp[i+1][p] += dp[i][p]



print((dp[n][a] - 1))
n, a = list(map(int, input().split()))

x = list(map(int, input().split()))



x.sort()

x = [i - a for i in x]

# print(x)

D = {0 : 1}

for i in x:

    for j, k in list(D.items()):

        D[i+j] = D.get(i+j, 0) + k



    # print(D)

print((D[0] - 1))

from collections import defaultdict

n, a = list(map(int, input().split()))
x = list(map(int, input().split()))
dp = [defaultdict(int) for _ in range(n + 1)]
dp[0][a] += 1
for i, x_i in enumerate(x):
    for p in list(dp[i].keys()):
        pk = p + a - x_i
        dp[i + 1][pk] += dp[i][p]
        dp[i + 1][p] += dp[i][p]
print((dp[n][a] - 1))

n, a = list(map(int, input().split()))
x = list(map(int, input().split()))
x.sort()
x = [i - a for i in x]
# print(x)
D = {0: 1}
for i in x:
    for j, k in list(D.items()):
        D[i + j] = D.get(i + j, 0) + k
    # print(D)
print((D[0] - 1))

-from collections import defaultdict - -dp = [defaultdict(int) for _ in range(n + 1)] -dp[0][a] += 1 -for i, x_i in enumerate(x): -    for p in list(dp[i].keys()): -        pk = p + a - x_i -        dp[i + 1][pk] += dp[i][p] -        dp[i + 1][p] += dp[i][p] -print((dp[n][a] - 1)) +x.sort() +x = [i - a for i in x] +# print(x) +D = {0: 1} +for i in x: +    for j, k in list(D.items()): +        D[i + j] = D.get(i + j, 0) + k +    # print(D) +print((D[0] - 1))