

import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	}

} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() set.add(s) set.add set s int i = 2; i 2 while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		} true {
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		} if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			} s % 2 == 0 s % 2 s 2 0 {
				s /= 2;
			} s /= 2 s 2 {
				s = s*3 + 1;
			} s = s*3 + 1 s s*3 + 1 s*3 s 3 1 if(set.contains(s)){
				System.out.println(i);
				return;
			} set.contains(s) set.contains set s {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; set.add(s) set.add set s i++ i String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	}

} Main


import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashSet<Integer> set = new HashSet<Integer>();

		set.add(s);
		int i = 2;

		while(true){
			if(s % 2 == 0){
				s /= 2;
			}
			else {
				s = s*3 + 1;
			}

			if(set.contains(s)){
				System.out.println(i);
				return;
			}

			set.add(s);
			i++;
		}

	}

}
