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

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    } main {
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int s = scan.nextInt(); s scan.nextInt() scan.nextInt scan ArrayList<Integer> a = new ArrayList<Integer>(); a new ArrayList<Integer>() a.add(s) a.add a s int index = 1; index 1 int flag = -1; flag -1 1 while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	} true {
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	} if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    } a.get(index-1) % 2 == 0 a.get(index-1) % 2 a.get(index-1) a.get a index-1 index 1 2 0 {
		a.add(a.get(index-1) / 2);
	    } a.add(a.get(index-1) / 2) a.add a a.get(index-1) / 2 a.get(index-1) a.get a index-1 index 1 2 {
		a.add(3*a.get(index-1)+1);
	    } a.add(3*a.get(index-1)+1) a.add a 3*a.get(index-1)+1 3*a.get(index-1) 3 a.get(index-1) a.get a index-1 index 1 1 for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    } int i = index-1; int i = index-1; i index-1 index 1 i >= 0 i 0 i-- i-- i {
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    } {
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    } if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		} a.get(index) == a.get(i) a.get(index) a.get a index a.get(i) a.get a i {
		    flag = 1;
		    break;
		} flag = 1 flag 1 break; if(flag == 1){
		break;
	    } flag == 1 flag 1 {
		break;
	    } break; index++ index System.out.println(index+1) System.out.println System.out System System.out index+1 index 1 String[] args args public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    }
} public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int s = scan.nextInt();
	ArrayList<Integer> a = new ArrayList<Integer>();

	a.add(s);

	int index = 1;
	int flag = -1;
	while(true){
	    if(a.get(index-1) % 2 == 0){
		a.add(a.get(index-1) / 2);
	    }else{
		a.add(3*a.get(index-1)+1);
	    }
	    for(int i = index-1; i >= 0; i--){
		if(a.get(index) == a.get(i)){
		    flag = 1;
		    break;
		}
	    }
	    if(flag == 1){
		break;
	    }
	    index++;
	}
	/*
	for(int i = 0; i < a.size(); i++){
	    System.out.println(a.get(i));
	}
	*/
	System.out.println(index+1);
    }
}
