#include #include using namespace std; int main() { int n0; cin >> n0; int i1 = 0, nmax = n0; while (n0 > 1) { if (n0 % 2 == 0) n0 /= 2; else n0 = 3 * n0 + 1; ++i1, nmax = max(n0, nmax); } cout << i1 << endl << nmax << endl; }