#include using namespace std; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } void solve() { int N, i = 0, ans = 0; cin >> N; vector v{N}; while (N != 1) { if (N % 2) N = N * 3 + 1; else N /= 2; chmax(ans, N); i++; } cout << i << endl; cout << ans << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }