#include "bits/stdc++.h" using namespace std; int main() { int N; cin >> N; for (int i = 0; ; i++) { if (N == 1) { cout << i << endl; return 0; } if (N % 2 == 0) N /= 2; else N++; } }