import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigDecimal; BigDecimal java.math import java.util.ArrayList; ArrayList java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} Main // Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	} main {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	} try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String N= br.readLine(); N br.readLine() br.readLine br int temp = Integer.parseInt(N); temp Integer.parseInt(N) Integer.parseInt Integer N List memory = new ArrayList(); memory new ArrayList() for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			} int i = 0; int i = 0; i 0 i < 1000000 i 1000000 i++ i++ i {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			} {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			} if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				} memory.contains(temp) memory.contains memory temp {
					System.out.println(i+1);
					break;
				} System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 break; {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				} memory.add(temp) memory.add memory temp if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				} temp % 2 == 1 temp % 2 temp 2 1 {
				    temp=3*temp+1;	
				} temp=3*temp+1 temp 3*temp+1 3*temp 3 temp 1 {
					temp=temp/2;
				} temp=temp/2 temp temp/2 temp 2 String[] args args public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String N= br.readLine();

			int temp = Integer.parseInt(N);
			List memory = new ArrayList();
			for (int i = 0;i < 1000000;i++) {
				if (memory.contains(temp)) {
					System.out.println(i+1);
					break;
				} else {
					memory.add(temp);
					//System.out.println("temp:" + temp);
				}
              
				if (temp % 2 == 1) {
				    temp=3*temp+1;	
				} else {
					temp=temp/2;
				}
				

			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
