import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	} main {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() Set<Integer> checkSet = new HashSet<>(); checkSet new HashSet<>() list.add(s) list.add list s checkSet.add(s) checkSet.add checkSet s int i = 0; i 0 while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		} list.size() == checkSet.size() list.size() list.size list checkSet.size() checkSet.size checkSet {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		} int a = list.get(i); a list.get(i) list.get list i if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			} a % 2 == 0 a % 2 a 2 0 {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			} int tmp = a / 2; tmp a / 2 a 2 list.add(tmp) list.add list tmp checkSet.add(tmp) checkSet.add checkSet tmp {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			} int tmp = 3 * a + 1; tmp 3 * a + 1 3 * a 3 a 1 list.add(tmp) list.add list tmp checkSet.add(tmp) checkSet.add checkSet tmp i++ i System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	}

} Main
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		sc.close();

		ArrayList<Integer> list = new ArrayList<>();
		Set<Integer> checkSet = new HashSet<>();
		list.add(s);
		checkSet.add(s);
		int i = 0;
		while(list.size() == checkSet.size()) {
			int a = list.get(i);
			if(a % 2 == 0) {
				int tmp = a / 2;
				list.add(tmp);
				checkSet.add(tmp);
			}else {
				int tmp = 3 * a + 1;
				list.add(tmp);
				checkSet.add(tmp);
			}
			i++;
		}
		System.out.println(i + 1);
	}

}