#include <bits/stdc++.h>
using namespace std;
unsigned long long lvl_len(int lvl) {
  static long long len[64] = {0};
  if (len[lvl])
    return len[lvl];
  else {
    len[1] = 1;
    for (int i = 2; i < 64; ++i) len[i] = len[i - 1] * 2 + 1;
  }
  return len[lvl];
}
void rec(int lvl, unsigned long long pos) {
  if (pos < lvl_len(lvl - 1))
    rec(lvl - 1, pos);
  else if ((pos -= lvl_len(lvl - 1)) < 1)
    cout << lvl;
  else
    rec(lvl - 1, pos - 1);
};
int main(int, char **) {
  ios::sync_with_stdio(false);
  unsigned long long n, p;
  cin >> n >> p;
  rec(n, p - 1);
  return 0;
}
