// Original C++ solution (slower):
#include<bits/stdc++.h>



using namespace std;

#define PROBLEM "B"



bool check[1000010];



int odd(int n){



	return 3*n + 1;

}



int even(int n){



	return n/2;

}





int main(){



	#ifdef DBG

	freopen("problem" PROBLEM ".in", "r", stdin);

	freopen("problem" PROBLEM ".out", "w", stdout);

	#endif



	memset(check, 0, sizeof(check));

	int n;

	int count = 0;

	while(cin >> n){



		while(!check[n]){



			check[n] = true;

			if(n % 2 == 0)

				n = even(n);

			else

				n = odd(n);

			count++;

		}

		cout << count+1 << endl;

	}



	return 0;

}

// Optimized solution to the same problem (faster):
////////////////////////// Author

////////////////////////// Nasim Hossain Rabbi

////////////////////////// JU-CSE28

////////////////////////// CF - imnasim3.1415

////////////////////////// UVA - imnasim3.1415

////////////////////////// Mail - imnasim3.1415@gmail.com

#include<bits/stdc++.h>

using namespace std;

#define E end()

#define B begin()

#define sz size()

#define EM empty()

#define clr clear()

#define sqr(a) (a*a)

#define mk make_pair

#define pb push_back

string en="\n";

string t="hello";

#define rep(i,n) for(i=0;i<n;i++)

#define Rep(i,n) for(i=1;i<=n;i++)

#define per(i,n) for(i=n-1;i>=0;i--)

#define peR(i,n) for(i=n;i>0;i--)

#define mem(a,b) memset(a,b,sizeof(a))

#define all(cont) cont.begin(),cont.end()

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)

#define pi 3.1415926535897932384626433832795

#define vi vector<int>

#define vl vector<long long>

#define vs vector<string>

#define vp(vi,x) cin>>x; vi.pb(x);

#define srch(a,x) binary_search(all(a),x)

#define LB(a,x) (lower_bound(all(a),x)-a.B)

#define UB(a,x) (upper_bound(all(a),x)-a.B)

typedef long long LL;

typedef unsigned long long ULL;

bool isprm(LL a){for(LL i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}

bool palin(string a){for(int i=0;i<a.sz;i++){if(a.at(i)!=a.at(a.sz-i-1))return 0;} return 1;}

bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

int toInt(string s){int sm;stringstream ss(s);ss>>sm;return sm;}

template<typename T>inline T gcd(T a,T b){if(a<0)return gcd(-a,b);if(b<0)return gcd(a,-b);return (b==0)?a:gcd(b,a%b);}

template<typename T>inline T lcm(T a,T b) {if(a<0)return lcm(-a,b);if(b<0)return lcm(a,-b);return a*(b/gcd(a,b));}

int main()

{

//    fast;

    LL i,j,k,n,m,l,s=0,x,y,tc=1,c=0;

    while(cin>>n)

    {

        map<int,int> mp;

        s=1;

        x=n;

        while(1)

        {

            if(mp.count(x)==1)

            {

                break;

            }

            if(x%2==0)

            {

                mp[x]++;

                x=x/2;

            }

            else

            {

                mp[x]++;

                x=3*x+1;

            }

        }

        cout<<mp.sz+1<<en;

    }

}




// Fastest known solution for this problem:
#include <iostream> 



int main()

{

    int s;

    std::cin >> s;

    int list[1000000];

    int index = 0;

    int a_i;

    int a_pre = s;

    list[0] = s;

    index = index + 1;

    bool search_flag = false;

    while( true){

        if ( a_pre % 2 == 0){

            a_i = a_pre / 2;

        } else {

            a_i = 3 * a_pre + 1;

        }

        list[index] = a_i;

        index = index + 1;

        for ( int i = 0; i< index-1; ++ i ){

            if ( list[i] == a_i) {

                search_flag = true;

                break;

            }

        }

        if (search_flag==true){

            break;

        } 

        a_pre = a_i;



    }

    std::cout << index << std::endl;

    return 0;

}