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