#include using namespace std; void solve() { int N; cin >> N; vector v{N}; while (N != 1) { if (N % 2) N = N * 3 + 1; else N /= 2; v.emplace_back(N); } cout << v.size() - 1 << endl; cout << *max_element(v.cbegin(), v.cend()) << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }