n, k = map(int, input().split()) print(2 ** (n-k) if n - k > 0 else (1 if n == k else 0))