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