import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map 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();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc Map<Integer, Integer> sequence = new HashMap<>(); sequence new HashMap<>() int i = 1; i 1 int tmp = s; tmp s while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		} true {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		} sequence.put(i, tmp) sequence.put sequence i tmp if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			} tmp%2 == 0 tmp%2 tmp 2 0 {
				tmp = tmp/2;
			} tmp = tmp/2 tmp tmp/2 tmp 2 {
				tmp = 3*tmp+1;;
			} tmp = 3*tmp+1 tmp 3*tmp+1 3*tmp 3 tmp 1 if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			} sequence.containsValue(tmp) sequence.containsValue sequence tmp {
				System.out.println(i+1);
				break;
			} System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 break; i++ i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	}
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Map<Integer, Integer> sequence = new HashMap<>();
		int i = 1;
		int tmp = s;
		while(true) {
			sequence.put(i, tmp);
			if(tmp%2 == 0) {
				tmp = tmp/2;
			} else {
				tmp = 3*tmp+1;;
			}
			if(sequence.containsValue(tmp)) {
				System.out.println(i+1);
				break;
			}
			i++;
		}
	}
}