#include void solve() { int n; std::cin >> n; int i = 0, max = n; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { n = n * 3 + 1; } ++i; max = std::max(max, n); } std::cout << i << std::endl << max << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }