#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n, m;
double k;
cin >> n;
m=log2(n);
k=log2(n);
while(m!=k){
n=n-(pow(2,m));
m=log2(n);
k=log2(n);
}
cout << m+1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7CiAgICBpbnQgbiwgbTsKICAgIGRvdWJsZSBrOwogICAgY2luID4+IG47CiAgICBtPWxvZzIobik7CiAgICBrPWxvZzIobik7CiAgICB3aGlsZShtIT1rKXsKICAgICAgICBuPW4tKHBvdygyLG0pKTsKICAgICAgICBtPWxvZzIobik7CiAgICAgICAgaz1sb2cyKG4pOwogICAgfQogICAgY291dCA8PCBtKzE7CiAgICByZXR1cm4gMDsKfQ==