#include void solve() { int n; std::cin >> n; int ans = 0; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { ++n; } ++ans; } std::cout << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }