#include #include #include using namespace std; int main() { int N, K; cin >> N; cin >> K; //x = x * pow(2, K)); static const int Nmax = pow(2, N); int x = 0; int correct = 0; for (int x = 1; x <= Nmax; x++) { correct += x % (int)pow(2, K) == 0 ? 1 : 0; } cout << correct << endl; }