#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e7 + 1;
const int INF = 2e9 + 3;
const double EPS = 1e-7;
void solve() {
  int n;
  long long k;
  cin >> n >> k;
  auto pw = 1ll << (n - 1);
  for (int i = n; i >= 1; i--, pw >>= 1) {
    if (pw > k) continue;
    if ((k - pw) % (pw * 2) == 0) {
      cout << i;
      return;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int t;
  t = 1;
  while (t--) solve();
}
