#include #include using namespace std; int main() { int N,i,j; cin >> N; i = 0; j = 0; while (N > 1) { if (N % 2 == 0) { N = N / 2; } else { N = (N - 1) / 2; j++; } i++; } cout << i + j; return 0; }