#include #include using namespace std; int main() { int N; cin >> N; int max_n = N; int cnt = 0; while(N != 1) { cnt++; if(N % 2 == 0) N = N/2; else N = 3 * N + 1; max_n = max(max_n, N); } cout << cnt << endl; cout << max_n << endl; return 0; }