#include <bits/stdc++.h>
using namespace std;
long long int calculate(long long int l, long long int r, long long int need,
                        long long int number) {
  long long int m = l + (r - l) / 2LL;
  if (need < m) return calculate(l, m - 1, need, number - 1);
  if (need > m) return calculate(m + 1, r, need, number - 1);
  return number;
}
int main() {
  long long int n, k;
  cin >> n >> k;
  long long int sz = 1;
  for (long long int i = 1; i < n; i++) {
    sz = sz * 2LL + 1LL;
  }
  cout << calculate(1, sz, k, n);
  return 0;
}
