N,K = map(int,input().split()) if K == 1: print(0) exit() ans = 2**(N-K) print(ans)