#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> v(60);
  vector<long long int> u(60);
  map<long long int, long long int> m_v;
  map<long long int, long long int> m_u;
  m_u[0] = 1;
  m_v[0] = 1;
  v.push_back(1);
  v.push_back(1);
  u = v;
  if (k % 2)
    cout << 1 << endl;
  else {
    for (long long int i = 1; i <= n; i++) {
      v[i] = v[i - 1] * 2 + 1;
      u[i] = (v[i] + 1) / 2;
      m_v[i] = v[i];
      m_u[i] = u[i];
    }
    long long int k_pos = 1;
    for (long long int i = 1; i <= n; i++) {
      if (k >= v[i])
        k_pos = i;
      else
        break;
    }
    ++k_pos;
    long long int key = k, idx;
    long long int counter = 50;
    while (k_pos > -1) {
      if (key != m_u[k_pos]) {
        key = abs(m_u[k_pos] - key);
        --k_pos;
      } else {
        idx = k_pos;
        break;
      }
    }
    cout << idx << endl;
  }
  return 0;
}
