#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 6;
long long n, k, a[54], ans = 0;
long long bs(long long i) {
  long long lo = 1, hi = (k) / ((long long)pow(2, i));
  while (lo <= hi) {
    long long mi = lo + (hi - lo) / 2;
    if ((a[i] + mi * ((long long)pow(2, i))) == k) {
      return i;
    }
    if ((a[i] + mi * ((long long)pow(2, i))) < k)
      lo = mi + 1;
    else
      hi = mi - 1;
  }
  return 0;
}
int main() {
  cin >> n >> k;
  a[1] = 1;
  for (int i = 2; i <= 50; ++i) a[i] = ((long long)pow(2, i - 1));
  for (int i = 1; i <= n; ++i) {
    if (bs(i) || a[i] == k) {
      printf("%d", i);
      return 0;
    }
  }
}
