#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a,b) memset((a),(b),sizeof(a)) const LL INF = 1e9 + 7; const int N = 1e3 + 10; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int maxv = 4; int n; cin >> n; int ans = 0; while (n != 1) { if (n & 1) n = 3 * n + 1; else n = n / 2; maxv = max(maxv,n); ans++; } cout << ans << endl; cout << maxv << endl; return 0; }