n,k = map(int, input().split()) if k == 0: print(2**n) else: num = 1 while num*(2**k) <= 2**n: num += 1 print(num-1)