#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int n0; cin >> n0; vector a = {n0}; while(a.back() != 1) { int n = a.back(); if(n % 2 == 0) a.push_back(n / 2); else a.push_back(3 * n + 1); } cout << a.size() - 1u << endl; cout << *max_element(a.begin(), a.end()) << endl; }