#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long k, c = 0;
  cin >> n >> k;
  while (k % 4 == 0) {
    c++;
    k /= 4;
  }
  if (k % 4 == 2)
    cout << c * 2 + 2 << endl;
  else
    cout << c * 2 + 1 << endl;
  return 0;
}
