import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	}
} import java.util.LinkedList; LinkedList 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 = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	} main {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc LinkedList<Integer> a = new LinkedList<Integer>(); a new LinkedList<Integer>() a.add(s) a.add a s for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	} int i=0; int i=0; i 0 i<=1000000 i 1000000 i++ i++ i {
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	} {
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	} int a_next; a_next if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		} a.get(i)%2 == 0 a.get(i)%2 a.get(i) a.get a i 2 0 {
    			a_next = a.get(i)/2;
    		} a_next = a.get(i)/2 a_next a.get(i)/2 a.get(i) a.get a i 2 {
    			a_next = 3*a.get(i)+1;
    		} a_next = 3*a.get(i)+1 a_next 3*a.get(i)+1 3*a.get(i) 3 a.get(i) a.get a i 1 if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		} a.contains(a_next) a.contains a a_next {
    			System.out.println(i+2);
    			return;
    		} System.out.println(i+2) System.out.println System.out System System.out i+2 i 2 return; {
    			a.add(a_next);
    		} a.add(a_next) a.add a a_next String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	}
} Main
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    	int s = Integer.parseInt(sc.next());

    	LinkedList<Integer> a = new LinkedList<Integer>();
    	a.add(s);

    	for (int i=0; i<=1000000; i++){
    		int a_next;
    		if (a.get(i)%2 == 0){
    			a_next = a.get(i)/2;
    		}else {
    			a_next = 3*a.get(i)+1;
    		}

    		if (a.contains(a_next)){
    			System.out.println(i+2);
    			return;
    		}else {
    			a.add(a_next);
    		}
    	}
	}
}