#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
template <class T>
inline bool fs(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
long long int sat(long long int n, long long int pos) {
  return n = n | (1LL << pos);
}
long long int reset(long long int N, long long int pos) {
  return N = N & ~(1LL << pos);
}
bool cak(long long int n, long long int pos) {
  return (bool)(n & (1LL << pos));
}
long long int binPow(long long int a, long long int q, long long int mud) {
  a %= mud;
  if (q == 0) return 1;
  return ((q % 2 == 1 ? a : 1) * binPow(a * a, q / 2, mud)) % mud;
}
pair<long long int, long long int> ex_clid(long long int a, long long int b) {
  if (b == 0) return pair<long long int, long long int>(1, 0);
  pair<long long int, long long int> d = ex_clid(b, a % b);
  return pair<long long int, long long int>(d.second,
                                            d.first - d.second * (a / b));
}
long long int mod_inv(long long int n, long long int md) {
  pair<long long int, long long int> d = ex_clid(n, md);
  return ((d.first % md) + md) % md;
}
template <class T>
double dif(T &a, T &b) {
  double ans = (a.first - b.first) * (a.first - b.first) +
               (a.second - b.second) * (a.second - b.second);
  return sqrt(ans);
}
long long int n, m, x;
int main() {
  fs(n);
  fs(m);
  long long int lf = 1, rf = pow(2, n), mid;
  if (rf == m) {
    cout << n << endl;
    return 0;
  }
  long long int cnt = 0;
  long long int ans;
  while (true) {
    mid = (lf + rf) / 2;
    if (mid == m) {
      cout << n << endl;
      break;
    } else if (mid > m)
      rf = mid;
    else if (mid < m)
      lf = mid;
    n--;
  }
  return 0;
}
