#include <bits/stdc++.h>
int main() {
  unsigned long long n, k, m, s;
  scanf("%llu%llu", &n, &k);
  m = pow(2, n - 1);
  if (k % 2 != 0)
    printf("1");
  else {
    s = m / 2;
    while (m != k) {
      if (k > m)
        m = m + s;
      else
        m = m - s;
      n--;
      s = s / 2;
    }
    printf("%llu", n);
  }
  return 0;
}
