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