#include using namespace std; int main() { int N; cin >> N; int mx = N; int num = 0; while(N > 1){ N = (N%2 ? 3*N+1 : N/2); mx = max(N, mx); num++; } cout << num << endl << mx << endl; return 0; }