#include <bits/stdc++.h>
using namespace std;
long long a[60], b[60];
int main() {
  long long n, m;
  cin >> n >> m;
  a[0] = 1, b[0] = 1;
  if (n == 1) {
    printf("1");
    return 0;
  }
  for (int i = 1; i < n; i++) {
    a[i] = a[i - 1] * 2;
    b[i] = b[i - 1] * 2 + 1;
    if (m <= b[i]) {
      for (int j = i; j >= 0; j--) {
        if (m == a[j]) {
          printf("%d", j + 1);
          return 0;
        } else if (m < a[j])
          continue;
        else
          m -= a[j];
      }
    }
  }
  return 0;
}
