import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	}

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc List <Integer> L =  new ArrayList <Integer>(); L new ArrayList <Integer>() int temp = A; temp A int i = 1; i 1 while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		} L.contains(temp)!=true L.contains(temp) L.contains L temp true {
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		} L.add(temp) L.add L temp if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1; temp%2==0 temp%2 temp 2 0 temp/=2 temp 2 temp = temp*3+1 temp temp*3+1 temp*3 temp 3 1 i++ i System.out.println(i) System.out.println System.out System System.out i sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		
		List <Integer> L =  new ArrayList <Integer>();
		
		int temp = A;
		int i = 1;
		
		while (L.contains(temp)!=true){
			L.add(temp);
			
			if (temp%2==0)
				temp/=2;
			else
				temp = temp*3+1;
	
			i++;
		}
		
		System.out.println(i);
		sc.close();
	}

}
