N, K = map(int, input().split()) ls = [i for i in range(1, 2**N+1) if i%(2**K)==0] print(len(ls))