#include <bits/stdc++.h>
using namespace std;
unsigned long long pow2[55];
int main() {
  unsigned long long n, i, mid;
  cin >> n;
  pow2[0] = 1;
  pow2[1] = 2;
  for (i = 2; i <= n; i++) pow2[i] = pow2[i - 1] * 2;
  unsigned long long p;
  cin >> p;
  while (1) {
    mid = pow2[n - 1];
    if (p == mid) {
      cout << n;
      break;
    } else if (p > mid) {
      p = p - mid;
    } else {
      p = p;
    }
    n--;
  }
}
