import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter ou = new PrintWriter(System.out); ou new PrintWriter(System.out) ArrayList<Integer> al = new ArrayList<Integer>(); al new ArrayList<Integer>() int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int yono = 1; yono 1 while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		} !al.contains(s) al.contains(s) al.contains al s {
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		} al.add(s) al.add al s yono++ yono if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1; s % 2 == 0 s % 2 s 2 0 s /= 2 s 2 s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 ou.println(yono) ou.println ou yono ou.flush() ou.flush ou String[] args args public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	}
} public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	}
} Main
import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		ArrayList<Integer> al = new ArrayList<Integer>();
		int s = Integer.parseInt(sc.next());
		int yono = 1;
		while(!al.contains(s)){
			al.add(s);
			yono++;
			if(s % 2 == 0) s /= 2;
			else s = 3 * s + 1;
		}
		ou.println(yono);
		ou.flush();
	}
}