#include #include #define rep(i,n) for(int i = 0; i < n; i++) #define srep(i,a,b) for(int i = a; i < b; i++) #define all(A) (A).begin(),A.end() #define MOD 1000000007 using namespace std; using ll = long long; using P = pair; using Graph = vector>; int f(int x){ return (x%2 == 0 ? x/2 : 3*x+1); } int main(void){ int n; cin >> n; vector A(401); A[0] = n; int M = A[0]; int p = 0; rep(i,400){ A[i+1] = f(A[i]); M = max(M,A[i+1]); if(f(A[i]) == 1){ p = i+1; break; } } cout << p << endl; cout << M; }