import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc Set<Integer>  set = new HashSet<Integer> (); set new HashSet<Integer> () int count =1; count 1 set.add(s) set.add set s while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		} true {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		} if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			} s%2==0 s%2 s 2 0 {
				s=s/2;
			} s=s/2 s s/2 s 2 {
				s=3*s+1;
			} s=3*s+1 s 3*s+1 3*s 3 s 1 if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			} set.contains(s)==true set.contains(s) set.contains set s true {
				System.out.println(count+1);
				break;
			} System.out.println(count+1) System.out.println System.out System System.out count+1 count 1 break; set.add(s) set.add set s count++ count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer> ();
		int count =1;
		set.add(s);
		while (true) {
			if (s%2==0) {
				s=s/2;
			} else {
				s=3*s+1;
			}
			if (set.contains(s)==true) {
				System.out.println(count+1);
				break;
			}
			set.add(s);
			count++;
		}
	}
}