#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int ans;
long long n = 1000000000000000000, m;
long long d;
int nint() {
  int x;
  scanf("%d", &x);
  return x;
}
long long up(long long x) {
  x -= d - 1;
  if (x <= 0) x += n;
  return x;
}
long long getans(long long c) {
  cout << "? " << c << endl;
  long long x;
  cin >> x;
  return up(x);
}
int main() {
  long long n, m;
  cin >> n >> m;
  m--;
  for (int p = (n)-1; p >= 0; p--) {
    if ((1ll << p) == m + 1) {
      cout << p + 1 << endl;
      return 0;
    }
    if ((1ll << p) <= m) m -= (1ll << p);
  }
  return 0;
}
