#include <bits/stdc++.h>
using namespace std;
const int maxn = 1001;
unsigned long long n, k;
int main() {
  cin >> n >> k;
  unsigned long long r = pow(2, n) - 1;
  unsigned long long l = 1, ans = n;
  while (l <= r) {
    unsigned long long m = (l + r) / 2;
    if (m == k)
      return cout << ans, 0;
    else if (m > k)
      r = m - 1, ans--;
    else
      l = m + 1, ans--;
  }
  cout << l;
  return 0;
}
