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 s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 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) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 1);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 1);
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

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

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 1);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 1);
	}
} 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 s = sc.nextInt();
		List lst = new ArrayList<Integer>();

		while (!lst.contains(s)) {
			lst.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}

		System.out.println(lst.size() + 1);
	}
}
