#include using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(),A.end() #define RALL(A) A.rbegin(),A.rend() typedef long long LL; typedef pair P; const LL mod=1000000007; const LL LINF=1LL<<60; const int INF=1<<30; int main(){ LL n;cin >> n; LL mx = 0, ma = 0; for (int i = 0; i <= 400; i++) { if(!ma&&n==1){ ma = i; } mx = max(mx, n); if(n%2==0) n /= 2; else n = n * 3 + 1; } cout << ma << endl; cout << mx << endl; return 0; }