#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair #define LP pair int main() { int n; cin >> n; int mx = n; int cnt = 0; while (n != 1) { if (n%2==0) n /= 2; else n = 3*n+1; mx = max(mx,n); cnt++; } cout << cnt << endl; cout << mx << endl; return 0; }