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

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

for i in range(n):

  x[i]-=a

dp=[]

for i in range(n+1):

  dp.append([])

  for i in range(6000):

    dp[-1].append(0)

dp[0][3000]=1

for i in range(n):

  for j in range(6000):

    if j+x[i]<6000 and j+x[i]>=0:

      dp[i+1][j+x[i]]+=dp[i][j]

      dp[i+1][j]+=dp[i][j]

print((dp[n][3000]-1))

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

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

dic={}

dic2=dic.copy()

for i in range(n):

  for j in dic:

    if j+x[i]-a in dic2:

      dic2[j+x[i]-a]+=dic[j]

    else:

      dic2[j+x[i]-a]=dic[j]

  if x[i]-a in dic2:

    dic2[x[i]-a]+=1

  else:

    dic2[x[i]-a]=1

  dic=dic2.copy()

if 0 in dic:

  print((dic[0]))

else:

  print((0))
n, a = list(map(int, input().split()))
x = list(map(int, input().split()))
for i in range(n):
    x[i] -= a
dp = []
for i in range(n + 1):
    dp.append([])
    for i in range(6000):
        dp[-1].append(0)
dp[0][3000] = 1
for i in range(n):
    for j in range(6000):
        if j + x[i] < 6000 and j + x[i] >= 0:
            dp[i + 1][j + x[i]] += dp[i][j]
            dp[i + 1][j] += dp[i][j]
print((dp[n][3000] - 1))

n, a = list(map(int, input().split()))
x = list(map(int, input().split()))
dic = {}
dic2 = dic.copy()
for i in range(n):
    for j in dic:
        if j + x[i] - a in dic2:
            dic2[j + x[i] - a] += dic[j]
        else:
            dic2[j + x[i] - a] = dic[j]
    if x[i] - a in dic2:
        dic2[x[i] - a] += 1
    else:
        dic2[x[i] - a] = 1
    dic = dic2.copy()
if 0 in dic:
    print((dic[0]))
else:
    print((0))

+dic = {} +dic2 = dic.copy() -    x[i] -= a -dp = [] -for i in range(n + 1): -    dp.append([]) -    for i in range(6000): -        dp[-1].append(0) -dp[0][3000] = 1 -for i in range(n): -    for j in range(6000): -        if j + x[i] < 6000 and j + x[i] >= 0: -            dp[i + 1][j + x[i]] += dp[i][j] -            dp[i + 1][j] += dp[i][j] -print((dp[n][3000] - 1)) +    for j in dic: +        if j + x[i] - a in dic2: +            dic2[j + x[i] - a] += dic[j] +        else: +            dic2[j + x[i] - a] = dic[j] +    if x[i] - a in dic2: +        dic2[x[i] - a] += 1 +    else: +        dic2[x[i] - a] = 1 +    dic = dic2.copy() +if 0 in dic: +    print((dic[0])) +else: +    print((0))