N , K = map(int,input().split()) counter = 0 i = 1 if K == 0: print(pow(2,N)) exit() p = pow(2,K) while p <= pow(2,N): counter += 1 i += 1 p = i * pow(2, K) print(counter)