import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		} main {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int[] data = new int[1000000]; data new int[1000000] 1000000 data[0] = s data[0] data 0 s int min = 100; min 100 for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		} int i = 1; int i = 1; i 1 i<1000000 i 1000000 i++ i++ i {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		} {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		} if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			} data[i-1]%2==0 data[i-1]%2 data[i-1] data i-1 i 1 2 0 {
				data[i]=data[i-1]/2;
			} data[i]=data[i-1]/2 data[i] data i data[i-1]/2 data[i-1] data i-1 i 1 2 {
				data[i]=3*data[i-1]+1;
			} data[i]=3*data[i-1]+1 data[i] data i 3*data[i-1]+1 3*data[i-1] 3 data[i-1] data i-1 i 1 1 for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		} int i = 0; int i = 0; i 0 i<1000000 i 1000000 i++ i++ i {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		} {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		} for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			} int j = i+1; int j = i+1; j i+1 i 1 j<1000000 j 1000000 j++ j++ j {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			} {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			} if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				} data[i]==data[j] data[i] data i data[j] data j {
					System.out.println(j+1);
					System.exit(0);
				} System.out.println(j+1) System.out.println System.out System System.out j+1 j 1 System.exit(0) System.exit System 0 String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();
		int[] data = new int[1000000];
		data[0] = s;
		int min = 100;

		for (int i = 1;i<1000000 ;i++ ) {
			if (data[i-1]%2==0) {
				data[i]=data[i-1]/2;
			}else{
				data[i]=3*data[i-1]+1;
			}
		}

		for (int i = 0;i<1000000 ;i++ ) {
			for (int j = i+1;j<1000000 ;j++ ) {
				if (data[i]==data[j]) {
					System.out.println(j+1);
					System.exit(0);
				}
			}
		}
		}
}
