#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k, c = 0, x;
  cin >> n >> k;
  if (k % 2 == 1) {
    cout << 1;
    return 0;
  }
  if (k & (k - 1) == 0) {
    c = 0;
    while (k != 1) {
      k = k / 2;
      c++;
    }
    cout << c + 1;
    return 0;
  }
  while ((k & (k - 1)) != 0) {
    x = 1;
    while (x < k) {
      x = x * 2;
    }
    x = x / 2;
    k = k % x;
  }
  c = 0;
  while (k != 1) {
    k = k / 2;
    c++;
  }
  cout << c + 1;
  return 0;
}
