#define _GLIBCXX_DEBUG #include using namespace std; int main() { int NO; cin >> NO; vector S(400); S[0] = NO; int fast1 = -1, maxval = NO; for(int i = 1; i < 400; i++){ if(S[i-1]%2 == 0){ S[i] = S[i-1]/2; if(S[i] == 1){ fast1 = i; break; } }else{ S[i] = 3*S[i-1]+1; if(S[i] > maxval){ maxval = S[i]; } } } cout << fast1 << endl << maxval << endl; }