import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	}
} import java.util.Arrays; Arrays 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();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc boolean[] a = new boolean[1000001]; a new boolean[1000001] 1000001 Arrays.fill(a, false) Arrays.fill Arrays a false a[s] = true a[s] a s true for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		} int m = 2; int m = 2; m 2 m < 1000001 m 1000001 m++ m++ m {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		} {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		} s = (s%2==0)?s/2:s*3+1 s (s%2==0)?s/2:s*3+1 (s%2==0) s%2 s 2 0 s/2 s 2 s*3+1 s*3 s 3 1 if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true; a[s] a s {
				System.out.println(m);
				break;
			} System.out.println(m) System.out.println System.out System System.out m break; a[s] = true a[s] a s true sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		boolean[] a = new boolean[1000001];Arrays.fill(a, false);
		a[s] = true;
		for (int m = 2; m < 1000001; m++) {
			s = (s%2==0)?s/2:s*3+1;
			if(a[s]) {
				System.out.println(m);
				break;
			}else a[s] = true;
		}
		sc.close();
	}
}