#include using namespace std; int main(int argc, const char * argv[]) { int X = 1; int N; cin >> N; if (N == 1) { cout << "0" << endl; return 0; } if ((log2(N) - (int)log2(N)) == 0) { cout << log2(N) << endl; return 0; } int r1= log2(N) + 1; int rst = r1; while (r1 == N) { r1--; rst++; } cout << rst + 1 << endl; return 0; }