#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int c, first, last, middle, n, k;
  cin >> n >> k;
  long long int p = n;
  long long int x = pow(2, n - 1);
  x = x + x - 1;
  first = 1;
  last = x;
  middle = (first + last) / 2;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  } else if (k == middle) {
    cout << n << endl;
    return 0;
  } else if (k % 2 != 0) {
    cout << 1 << endl;
    return 0;
  } else {
    while (first <= last) {
      if (middle == k || middle + 1 == k) {
        break;
      } else if (k > middle)
        first = middle;
      else
        last = middle;
      middle = (first + last) / 2;
      p--;
    }
  }
  cout << p << endl;
  return 0;
}
