#include #include #include using namespace std; int main() { int n0; cin >> n0; vector vc; vc.push_back(n0); int index = 0; int before = n0; int after = n0; while (true) { if (after == 1) break; if (before % 2 == 0) { after = before / 2; } else { after = 3 * before + 1; } vc.push_back(after); index++; before = after; } cout << index << "\n"; sort(vc.begin(), vc.end()); cout << vc.at(vc.size()-1) << "\n"; return 0; }