#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1e9;
const int N = 1010;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  int n;
  long long k;
  while (~scanf("%d%I64d", &n, &k)) {
    long long sum = pow(2, n);
    long long x = min(k, sum - k), ans = 1;
    while (x % 2 == 0) {
      ans++;
      x /= 2;
    }
    printf("%d\n", ans);
  }
  return 0;
}
