import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	}
} 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);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc long ans = 0l; ans 0l ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(s) list.add list s for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		} int i = 2; int i = 2; i 2 i < Integer.MAX_VALUE i Integer.MAX_VALUE Integer Integer.MAX_VALUE i++ i++ i {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		} {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		} int x = 0; x 0 if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			} s%2 == 0 s%2 s 2 0 {
				x = s/2;
			} x = s/2 x s/2 s 2 {
				x = (3*s)+1;
			} x = (3*s)+1 x (3*s)+1 (3*s) 3 s 1 if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			} list.contains(x) list.contains list x {
				ans = i;
				break;
			} ans = i ans i break; {
				list.add(x);
				s = x;
			} list.add(x) list.add list x s = x s x System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		long ans = 0l;
		ArrayList<Integer> list = new ArrayList<>();
		list.add(s);
		for(int i = 2; i < Integer.MAX_VALUE; i++) {
			int x = 0;
			if(s%2 == 0) {
				x = s/2;
			}else {
				x = (3*s)+1;
			}
			if(list.contains(x)) {
				ans = i;
				break;
			}else {
				list.add(x);
				s = x;
			}
		}
		System.out.println(ans);
	}
}
