N, K = map(int, input().split()) if K == 0: print(2 ** N) elif K > N: print(0) else: print(2 ** (N - K))