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