#include using namespace std; #define rep(i,a,b) for(int i=a;i>= 1; return r; } //----------------------------------------------------------------- int main() { int N, K; while (cin >> N >> K) { if (K == 1) cout << modpow(2, N - 1) - 2 << endl; else cout << modpow(2, N - K) << endl; } }