#include #define int long long #define double long double #define INF 1e18 using namespace std; signed main() { int N, K; cin >> N >> K; int l = ceil(pow(2, -K)); int r = pow(2, N-K); cout << r-l+1 << endl; }