#include using namespace std; using ll = long long; const int mod = 1e9 + 7; const int inf = (1 << 30) - 1; const ll infll = (1LL << 61) - 1; #define fast() cin.tie(0), ios::sync_with_stdio(false) ll N; int main() { cin >> N; ll ans = N, ind = 0; while (N != 1) { if (N % 2 == 0) N /= 2; else N = 3 * N + 1; ind++, ans = max(ans, N); } cout << ind << "\n" << ans << "\n"; }