#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k, num;
  cin >> n >> k;
  if (k > pow(2, n - 1)) {
    k = 2 * pow(2, n - 1) - k;
  }
  num = 0;
  while (k % 2 == 0) {
    num++;
    k /= 2;
  }
  cout << num + 1 << endl;
}
