N,K = map(int,input().split()) if N==2 and K == 1: print(0) else: print(pow(2,N-K))