#include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int MOD = 1e9 + 7;

signed main(){
    int n;
    cin >> n;
    int i = 0;
    int ans = 0;
    if(n == 1){
        cout << 1 << endl;
        cout << 0 << endl;
        return 0;
    }
    while(n != 1){
        i++;
        ans = max(ans, n);
        if(n % 2 == 0){
            n = n / 2;
        }else{
            n = 3 * n + 1;
        }
    }
    cout << i << endl;
    cout << ans << endl;
}