#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m = 1000000007) {
  long long ans = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) ans = (1ll * a * ans) % m;
    b >>= 1;
    a = (1ll * a * a) % m;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool cmp(pair<string, int> p1, pair<string, int> p2) {
  return p1.second > p2.second;
}
const long long MAXN = 5 * 1000 + 10;
long long x, y, d;
void extendEuclid(long long a, long long m) {
  if (m == 0) {
    d = a;
    x = 1;
    y = 0;
  } else {
    extendEuclid(m, a % m);
    long long temp = x;
    x = y;
    y = temp - (a / m) * y;
  }
}
long long modInverse(long long a, long long m) {
  extendEuclid(a, m);
  return (x % m + m) % m;
}
long long const INF = 100000000;
vector<long long> dis(100005, LONG_LONG_MAX);
vector<long long> p(100005, 0);
long long rec(long long l, long long r, long long need, long long n) {
  long long m = l + (r - l) / 2;
  if (need < m)
    return rec(l, m - 1, need, n - 1);
  else if (need > m)
    return rec(m + 1, r, need, n - 1);
  else
    return n;
}
int32_t main() {
  long long n, k;
  cin >> n >> k;
  long long sz = 1;
  for (long long i = 1; i < n; i++) sz = sz * 2 + 1;
  cout << rec(1, sz, k, n);
  return 0;
};
