n,k = map(int,input().split()) count=0 for i in range(1,2**n+1): if i%(2**k)==0: count+=1 print(count)