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