#include using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); ll n0; cin >> n0; ll nmax = n0; int i1 = 0; while (n0 != 1) { if (n0 % 2 == 0) n0 /= 2; else { n0 = n0 * 3 + 1; nmax = max(nmax, n0); } i1++; } cout << i1 << endl; cout << nmax << endl; return 0; }