N,W = map(int,input().split()) A = list(map(int,input().split())) n = A.count(0) if n>0: B = [] for i in range(N): if A[i]>0: B.append(A[i]) else: B = A[:] N = len(B) ans = [] for i in range(1<>k)&1: cnt += B[k] ind.append(k) if cnt==W: ans.append(i) elif cnt>W: for j in range(1<>k)&1: cnt += B[ind[k]]//2 else: cnt += B[ind[k]] if cnt==W: ans.append(i) break print(len(ans)*2**n)