from sys import stdin def main(): N, K = map(int, input().split()) x = 2 ** K xmax = 2 ** N if not K: print(xmax) return cnt = 0 i = 1 while 1: if x * i <= xmax: cnt += 1 else: break i += 1 print(cnt) input = lambda: stdin.readline() main()