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