#include <bits/stdc++.h>
using namespace std;
long long calcular(long long n) {
  long long k = 1;
  while (n != 1) {
    n--;
    k = k * 2 + 1;
  }
  return k;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  long long N = calcular(n);
  while (true) {
    N = (N - 1) / 2;
    if (k == N + 1) {
      cout << n << "\n";
      break;
    } else if (k > N + 1) {
      k -= N + 1;
    }
    n--;
  }
  return 0;
}
