N, K = list(map(int,input().split())) num = 1 cnt = 0 while True: if K == 0: print(2**N) break else: if num * (2**K) <= 2**N: cnt += 1 num += 1 else: break print(cnt)