#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int k;
  cin >> n >> k;
  long long int l = 1;
  for (int i = 1; i <= n; i++) {
    l = l * 2;
  }
  l = l - 1;
  int ans = 0;
  while (1) {
    long long int mid = (l + 1) / 2;
    if (k == mid) {
      ans = n;
      break;
    } else {
      k = abs(k - mid);
      n--;
      l = mid - 1;
    }
  }
  cout << ans;
}
