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