#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long N, M;
  cin >> N >> M;
  if (M > N)
    cout << 0 << endl;
  else {
    long long ans = 1;
    for (long long i = 0, i_len = (N - M); i < i_len; ++i) ans *= 2;
    cout << ans << endl;
  }
  return 0;
}
