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