N,K = map(int,input().split()) max_value = pow(2,N) div = pow(2,K) x = [i for i in range(1,max_value+1) if i%div == 0] print(len(x))