#include #include #include #include #include using namespace std; int main(void) { int N, K; cin >> N >> K; int ans = 0; int max = pow(2, N), x = pow(2, K); int y = x; while( x <= max){ ans++; x += y; } cout << ans << endl; }