#include #include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define GETLINE( A ) string A; getline( cin , A ) #define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ ) int main() { CIN( ll , n ); ll i = 0; ll n_max = n; while( n != 1 ){ if( n % 2 == 0 ){ n /= 2; } else { n = 3 * n + 1; } i++; if( n_max < n ){ n_max = n; } } cout << i << endl; cout << n_max << endl; return 0; }