def power_of_two(n,k): x_min = 2**k x_max = 2**n counter = 0 x = x_min if x == 1: counter = x_max else: while x <= x_max: counter += 1 x += x_min return counter n,k = map(int,input().split()) ans = power_of_two(n,k) print(ans)