#include "bits/stdc++.h" using namespace std; void solve() { int n; cin >> n; int cnt = 0, maxi = n; while (n > 1) { cnt++; if (n & 1) { n = n * 3 + 1; } else { n >>= 1; } maxi = max(n, maxi); } cout << cnt << endl << maxi << endl; } int main() { solve(); return 0; }