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