#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n, k;
  cin >> n >> k;
  unsigned long long r = 1, l = 0, num = n, mid;
  for (int i = 0; i < n; i++) {
    r <<= 1;
  }
  mid = (l + r) >> 1;
  while (mid != k) {
    --num;
    if (mid > k)
      r = mid;
    else
      l = mid;
    mid = (l + r) >> 1;
  }
  cout << num;
  return 0;
}
