//2019/3/14
import java.util.ArrayList;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	}

} import java.util.ArrayList; ArrayList 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 s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	}

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

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	} main {

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int n = 1; n 1 int Fn = s; Fn s ArrayList<Integer> array = new ArrayList<>(); array new ArrayList<>() array.add(s) array.add array s while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		} true {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		} if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1; Fn%2==0 Fn%2 Fn 2 0 Fn /= 2 Fn 2 Fn = 3*Fn+1 Fn 3*Fn+1 3*Fn 3 Fn 1 if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			} array.contains(Fn) array.contains array Fn {

				System.out.println(n+1);

				break;
			} System.out.println(n+1) System.out.println System.out System System.out n+1 n 1 break; array.add(Fn) array.add array Fn n++ n String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	}

} Main
//2019/3/14
import java.util.ArrayList;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		int n = 1;

		int Fn = s;

		ArrayList<Integer> array = new ArrayList<>();

		array.add(s);

		while(true) {

			if(Fn%2==0) Fn /= 2;

			else Fn = 3*Fn+1;

			if(array.contains(Fn)) {

				System.out.println(n+1);

				break;
			}

			array.add(Fn);

			n++;
		}
	}

}
