import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	}
} import java.util.*; util.* java public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	}
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	} main {
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc ArrayList<Integer> a = new ArrayList<Integer>(); a new ArrayList<Integer>() a.add(s) a.add a s for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		} int i=1; int i=1; i 1 i++ i++ i {
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		} {
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		} if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			} a.get(i-1)%2==0 a.get(i-1)%2 a.get(i-1) a.get a i-1 i 1 2 0 {
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			} int x = a.get(i-1)/2; x a.get(i-1)/2 a.get(i-1) a.get a i-1 i 1 2 if(a.contains(x)){
					System.out.println(i+1);
					return;
				} a.contains(x) a.contains a x {
					System.out.println(i+1);
					return;
				} System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 return; a.add(x) a.add a x {
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			} int y = 3*a.get(i-1)+1; y 3*a.get(i-1)+1 3*a.get(i-1) 3 a.get(i-1) a.get a i-1 i 1 1 if(a.contains(y)){
					System.out.println(i+1);
					return;
				} a.contains(y) a.contains a y {
					System.out.println(i+1);
					return;
				} System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 return; a.add(y) a.add a y String[] args args public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	}
} public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	}
} Main
import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>();
		a.add(s);
		
		for(int i=1;;i++){
			if(a.get(i-1)%2==0){
				int x = a.get(i-1)/2;
				if(a.contains(x)){
					System.out.println(i+1);
					return;
				}
				a.add(x);
			}else{
				int y = 3*a.get(i-1)+1;
				if(a.contains(y)){
					System.out.println(i+1);
					return;
				}
				a.add(y);
			}
		}
	}
}
