#include #include #include #include #include #include //--------------------------- using namespace std; //--------------------------- #define REP(i,n) for(int i = 0; i < (n); i++) #define P(x) cout << (x) << "\n" //--------------------------- int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); int n;cin >> n; int t = 0; int m = 0; while (1) { int a; a = n - pow(2,m); if (a < 0) { t = m; break; }else{ m++; } } cout << (n - pow(2,t-1) == 0 ? t-1 : t); return 0; }