N, A = list(map(int, input().split()))

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

s = [{} for i in range(N+1)]

s[0][0] = 1



for i in range(N):

  cur = X[i]

  for j in range(N, 0, -1):

    for k, v in list(s[j-1].items()):

      s[j][cur + k] = s[j].get(cur + k, 0) + v



ans = 0

for i in range(1, N+1):

  ans += s[i].get(i*A, 0)

print(ans)
N, A = list(map(int, input().split()))

X = list([int(x) - A for x in input().split()])



d = {0: 1}



for cur in X:

  for k, v in list(d.items()):

    d[cur + k] = d.get(cur + k, 0) + v

    

print((d[0]-1))
N, A = list(map(int, input().split()))
X = list(map(int, input().split()))
s = [{} for i in range(N + 1)]
s[0][0] = 1
for i in range(N):
    cur = X[i]
    for j in range(N, 0, -1):
        for k, v in list(s[j - 1].items()):
            s[j][cur + k] = s[j].get(cur + k, 0) + v
ans = 0
for i in range(1, N + 1):
    ans += s[i].get(i * A, 0)
print(ans)

N, A = list(map(int, input().split()))
X = list([int(x) - A for x in input().split()])
d = {0: 1}
for cur in X:
    for k, v in list(d.items()):
        d[cur + k] = d.get(cur + k, 0) + v
print((d[0] - 1))

-X = list(map(int, input().split())) -s = [{} for i in range(N + 1)] -s[0][0] = 1 -for i in range(N): -    cur = X[i] -    for j in range(N, 0, -1): -        for k, v in list(s[j - 1].items()): -            s[j][cur + k] = s[j].get(cur + k, 0) + v -ans = 0 -for i in range(1, N + 1): -    ans += s[i].get(i * A, 0) -print(ans) +X = list([int(x) - A for x in input().split()]) +d = {0: 1} +for cur in X: +    for k, v in list(d.items()): +        d[cur + k] = d.get(cur + k, 0) + v +print((d[0] - 1))