N,K = map(int,input().split()) serch = 2 ** N if K != 0: step = 2 ** K xs = [x for x in range(1,serch + 1,step)] print(len(xs)) else: print(serch)