import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Stack;


public class Main{

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.Stack; Stack java.util public class Main{

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	} main {

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s =sc.nextInt(); s sc.nextInt() sc.nextInt sc long a[]=new long[1000001]; a new long[1000001] 1000001 Map<Long,Integer> m=new HashMap<Long,Integer>(); m new HashMap<Long,Integer>() int n=2; n 2 a[1]=s a[1] a 1 s boolean c=false; c false Stack<Long> box= new Stack<Long>(); box new Stack<Long>() m.put(a[1],1) m.put m a[1] a 1 1 while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		} c==false c false {
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		} if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1; a[n-1]%2==0 a[n-1]%2 a[n-1] a n-1 n 1 2 0 a[n]=a[n-1]/2 a[n] a n a[n-1]/2 a[n-1] a n-1 n 1 2 a[n]=3*a[n-1]+1 a[n] a n 3*a[n-1]+1 3*a[n-1] 3 a[n-1] a n-1 n 1 1 if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n); m.get(a[n])!=null m.get(a[n]) m.get m a[n] a n null {
				c=true;
				System.out.println(n);
			} c=true c true System.out.println(n) System.out.println System.out System System.out n m.put(a[n], n) m.put m a[n] a n n ++n n String args[] args public class Main{

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	}
} public class Main{

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	}
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Stack;


public class Main{

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int s =sc.nextInt();

		long a[]=new long[1000001];
		Map<Long,Integer> m=new HashMap<Long,Integer>();

		int n=2;

		a[1]=s;
		boolean c=false;

		Stack<Long> box= new Stack<Long>();
		m.put(a[1],1);

		while(c==false){
			if(a[n-1]%2==0)a[n]=a[n-1]/2;
			else a[n]=3*a[n-1]+1;

			if(m.get(a[n])!=null){
				c=true;
				System.out.println(n);
			}
			else m.put(a[n], n);

			++n;

		}


	}
}