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

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	}
} 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) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<>(); list new ArrayList<>() while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		} true {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		} if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			} list.indexOf(s) != -1 list.indexOf(s) list.indexOf list s -1 1 {
				System.out.println(list.size() + 1);
				System.exit(0);
			} System.out.println(list.size() + 1) System.out.println System.out System System.out list.size() + 1 list.size() list.size list 1 System.exit(0) System.exit System 0 list.add(s) list.add list s if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			} s % 2 == 0 s % 2 s 2 0 {
				s /= 2;
			} s /= 2 s 2 {
				s = 3 * s + 1;
			} s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		while (true) {
			if (list.indexOf(s) != -1) {
				System.out.println(list.size() + 1);
				System.exit(0);
			}
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
	}
}
