/* No.887 Collatz https://yukicoder.me/problems/no/887 */ #include using namespace std; void collatz(long long int n) { long long int max = n; long long int i = 0; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { n = 3 * n + 1; } if (max < n) { max = n; } i++; } cout << i << endl; cout << max << endl; } int main() { ios::sync_with_stdio(0); cin.tie(0); unsigned long long int n = 0; cin >> n; collatz(n); }