#include using namespace std; using lint = long long int; using pint = pair; using plint = pair; #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((lint)(x).size()) #define POW2(n) (1LL << (n)) #define FOR(i, begin, end) for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--) #define REP(i, n) FOR(i, 0, n) #define IREP(i, n) IFOR(i, 0, n) #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif int main() { lint n; cin >> n; lint ans, tmp; lint ni = n; lint nmax = n; lint i = 0; while(ni!=1){ if(ni%2==0){ ni /= 2; }else{ ni = 3 * ni + 1; } nmax = max(nmax, ni); i++; } cout << i <<"\n"; cout << nmax << "\n"; return 0; }