#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n >> k;
  long long an = 1;
  for (long long i = 1; i < n; i++) an = 2 * an + 1;
  long long s = 1, en = an;
  while (1) {
    long long mid = (s + en) / 2;
    if (mid == k) {
      cout << n;
      return 0;
    }
    n--;
    if (mid > k)
      en = mid - 1;
    else
      s = mid + 1;
  }
}
