#include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using VB = vector<bool>;
using VVB = vector<VB>;
using VD = vector<double>;
using VVD = vector<VD>;
using VS = vector<string>;
using PII = pair<int, int>;
using VPII = vector<PII>;
using VL = vector<long long>;
using VVL = vector<VL>;
int n;
long long k;
int solve(long long lo, long long hi, int centre) {
  long long mid = (lo + hi) / 2;
  if (k < mid)
    return solve(lo, mid - 1, centre - 1);
  else if (k > mid)
    return solve(mid + 1, hi, centre - 1);
  return centre;
}
int kth() {
  long long len = 1;
  for (int i = 2; i <= n; ++i) len = (len * 2) + 1;
  return solve(1ll, len, n);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  cout << kth() << endl;
  return 0;
}
