#include <bits/stdc++.h>
using namespace std;
long long two[55];
int pos(long long k) {
  int i;
  for (i = 1; i <= 51; i++)
    if (two[i] > k) return i - 1;
}
int main() {
  long long k;
  int n, i, p;
  cin >> n >> k;
  two[0] = 1;
  for (i = 1; i <= 51; i++) two[i] = two[i - 1] * 2;
  p = pos(k);
  while (two[p] != k) {
    k = two[p] * 2 - k;
    p = pos(k);
  }
  cout << p + 1 << endl;
  return 0;
}
