import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	}

	public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	}
	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


} import java.io.*; io.* java import java.util.*; util.* java public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	}

	public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	}
	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


} Main final static long MOD = 1000000007; MOD 1000000007 public static String[] Ws = null; Ws null public static int wsIndx = 0; wsIndx 0 public static BufferedReader in = null; in null public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	} main {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	} int s = nextInt(); s nextInt() nextInt long ans = 1; ans 1 long[] a = new long[1000000]; a new long[1000000] 1000000 Arrays.fill(a, -1) Arrays.fill Arrays a -1 1 a[0]=s a[0] a 0 s int k=1; k 1 boolean flg=true; flg true while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		} flg {
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		} if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			} a[k-1]%2==0 a[k-1]%2 a[k-1] a k-1 k 1 2 0 {
				a[k]=a[k-1]/2;
			} a[k]=a[k-1]/2 a[k] a k a[k-1]/2 a[k-1] a k-1 k 1 2 {
				a[k]=a[k-1]*3+1;

			} a[k]=a[k-1]*3+1 a[k] a k a[k-1]*3+1 a[k-1]*3 a[k-1] a k-1 k 1 3 1 for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			} int i=0; int i=0; i 0 i<k i k i++ i++ i {
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			} {
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			} if(a[k]==a[i]){
					flg=false;
					break;
				} a[k]==a[i] a[k] a k a[i] a i {
					flg=false;
					break;
				} flg=false flg false break; k++ k System.out.println(k) System.out.println System.out System System.out k String[] args args public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	} isExpN {
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	} int x=1; x 1 while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		} (int)Math.pow(x, 2) <= a (int)Math.pow(x, 2) Math.pow Math x 2 a {
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		} if((int)Math.pow(x, 2) == a){
				return true;
			} (int)Math.pow(x, 2) == a (int)Math.pow(x, 2) Math.pow Math x 2 a {
				return true;
			} return true; true x*=base x base return false; false long a a int base base public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	} check {
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	} if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		} in == null in null {
			in = new BufferedReader(new InputStreamReader(System.in));
		} in = new BufferedReader(new InputStreamReader(System.in)) in new BufferedReader(new InputStreamReader(System.in)) if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		} Ws==null || Ws.length<=wsIndx Ws==null Ws null Ws.length<=wsIndx Ws.length Ws Ws.length wsIndx {
			Ws = in.readLine().split(" ");
			wsIndx=0;
		} Ws = in.readLine().split(" ") Ws in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " wsIndx=0 wsIndx 0 public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	} nextInt {
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	} check() check return Integer.parseInt(Ws[wsIndx++]); Integer.parseInt(Ws[wsIndx++]) Integer.parseInt Integer Ws[wsIndx++] Ws wsIndx++ wsIndx public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	} nextLong {
		check();
		return Long.parseLong(Ws[wsIndx++]);
	} check() check return Long.parseLong(Ws[wsIndx++]); Long.parseLong(Ws[wsIndx++]) Long.parseLong Long Ws[wsIndx++] Ws wsIndx++ wsIndx public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	} nextString {
		check();
		return Ws[wsIndx++];
	} check() check return Ws[wsIndx++]; Ws[wsIndx++] Ws wsIndx++ wsIndx public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} nextInts {
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} check() check int[] tmp = new int[Ws.length]; tmp new int[Ws.length] Ws.length Ws Ws.length for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		} int i=0; int i=0; i 0 i<tmp.length i tmp.length tmp tmp.length i++ i++ i {
			tmp[i]=Integer.parseInt(Ws[i]);
		} {
			tmp[i]=Integer.parseInt(Ws[i]);
		} tmp[i]=Integer.parseInt(Ws[i]) tmp[i] tmp i Integer.parseInt(Ws[i]) Integer.parseInt Integer Ws[i] Ws i wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return tmp; tmp public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} nextLongs {
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} check() check long[] tmp = new long[Ws.length]; tmp new long[Ws.length] Ws.length Ws Ws.length for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		} int i=0; int i=0; i 0 i<tmp.length i tmp.length tmp tmp.length i++ i++ i {
			tmp[i]=Long.parseLong(Ws[i]);
		} {
			tmp[i]=Long.parseLong(Ws[i]);
		} tmp[i]=Long.parseLong(Ws[i]) tmp[i] tmp i Long.parseLong(Ws[i]) Long.parseLong Long Ws[i] Ws i wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return tmp; tmp public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	} nextStrings {
		check();
		wsIndx=Ws.length;
		return Ws;
	} check() check wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return Ws; Ws public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	}

	public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	}
	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


} public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	}

	public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	}
	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


} Main
import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int s = nextInt();

		long ans = 1;
		long[] a = new long[1000000];
		Arrays.fill(a, -1);
		a[0]=s;
		int k=1;
		boolean flg=true;
		while(flg){
			if(a[k-1]%2==0){
				a[k]=a[k-1]/2;
			}else{
				a[k]=a[k-1]*3+1;

			}
			for(int i=0;i<k;i++){
				if(a[k]==a[i]){
					flg=false;
					break;
				}
			}
			k++;
		}
		System.out.println(k);
	}

	public static boolean isExpN(long a,int base){
		int x=1;
		while((int)Math.pow(x, 2) <= a){
			if((int)Math.pow(x, 2) == a){
				return true;
			}
			x*=base;
		}
		return false;
	}
	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


}
