n,k=map(int,input().split()) arr=list(map(int,input().split())) dp=[0]*(2**n) dp[0]=k for i in range(n): dp[1<