#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long LG = pow(2, (int)log2(k));
  long long size = (1 << n) - 1;
  if (k % 2) {
    cout << 1;
    return 0;
  }
  while (k > 0) {
    if ((k & (k - 1)) == 0) {
      cout << log2(k) + 1;
      return 0;
    }
    if (LG > k) {
      LG /= 2;
    } else {
      k -= LG;
      LG /= 2;
    }
  }
  return 0;
}
