import itertools
N,A=map(int,input().split())
l=input().split()
ls=[]
a=0
for i in l:
     ls.append(eval(i))
for s in range(1,N+1):
     for i in itertools.combinations(ls,s):
          if sum(i)/s==A:
               a+=1
print(a)