#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; #define MP make_pair #define PB push_back #define inf 1000000007 #define mod 1000000007 #define rep(i,n) for(int i = 0; i < (int)(n); ++i) int main(){ ll n; cin >> n; int c = 0; ll res = 0; while(n!=1){ res = max(res,n); if(n%2==0){ n/=2; }else{ n = 3*n+1; } c++; } cout << c << endl << res << endl; return 0; }