// No.642 Two Operations No.1 // https://yukicoder.me/problems/no/642a // #include using namespace std; int solve(int N); int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int N; cin >> N; int ans = solve(N); cout << ans << endl; } int solve(int N) { int ans = 0; while (N != 1) { if (N % 2 == 0) N /= 2; else ++N; ++ans; } return ans; }