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


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc a.add(s) a.add a s while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		} true {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		} if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			} s % 2 == 0 s % 2 s 2 0 {
				s = s/2;
				a.add(s);
			} s = s/2 s s/2 s 2 a.add(s) a.add a s {
				s = 3*s + 1;
				a.add(s);
			} s = 3*s + 1 s 3*s + 1 3*s 3 s 1 a.add(s) a.add a s for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			} int i = 0; int i = 0; i 0 i < a.size() - 1 i a.size() - 1 a.size() a.size a 1 i++ i++ i {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			} {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			} for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				} int j = i+1; int j = i+1; j i+1 i 1 j < a.size() j a.size() a.size a j++ j++ j {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				} {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				} if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					} a.get(i) == a.get(j) a.get(i) a.get a i a.get(j) a.get a j {
						System.out.println(j+1);
						return;
					} System.out.println(j+1) System.out.println System.out System System.out j+1 j 1 return; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	}

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


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		int s = sc.nextInt();
		a.add(s);
		
		while(true) {
			if(s % 2 == 0) {
				s = s/2;
				a.add(s);
			}else {
				s = 3*s + 1;
				a.add(s);
			}
			for(int i = 0; i < a.size() - 1; i++) {
				for(int j = i+1; j < a.size(); j++) {
					if(a.get(i) == a.get(j)) {
						System.out.println(j+1);
						return;
					}
				}
			}
		}
	}

}
