import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,K = map(int,read().split()) answer = 1 << (N-K) if N >= K else 0 print(answer)