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