import math n,k = map(int,input().split()) count = 0 n = math.pow(2,n) k = math.pow(2,k) i=1 if k == 1: print(int(n)) else: while(1): if k*i <= n: count += 1 else: break i+=1 print(count)