// yukicoder 887 Collatz // 2019.9.20 bal4u #include typedef long long ll; int main() { ll n0, nmax; int i1; scanf("%lld", &n0); i1 = 0, nmax = n0; while (n0 > 1) { if (n0 & 1) { n0 = 3*n0 + 1; if (n0 > nmax) nmax = n0; } else n0 >>= 1; i1++; } printf("%d\n%lld\n", i1, nmax); return 0; }