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