#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  long long int k;
  cin >> k;
  long long int mid = (long long int)((long long int)1 << t - 1);
  if (k == mid) {
    cout << t << endl;
    return 0;
  }
  while (k != mid) {
    if (k > mid) {
      k = k - mid;
    }
    t = t - 1;
    mid = ((long long int)1 << t - 1);
  }
  cout << t << endl;
  return 0;
}
