n,w=map(int,input().split()) a=list(map(int,input().split())) c=0 for i in range(1,1<>j)&1] if sum(b)==w: c+=1 elif sum(b)>w: if (sum(b)-w)*2 in b: c+=1 print(c)