#include using namespace std; int main(){ int N, K; cin >> N >> K; if (K == 1){ cout << (1 << N - K) - 1 << endl; } else { cout << (1 << N - K) << endl; } }