import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 } main {
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc List<Integer> con = new ArrayList<>(); con new ArrayList<>() while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   } !con.contains(N) con.contains(N) con.contains con N {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   } con.add(N) con.add con N if(N%2==0) N = N/2;
     else N = 3*N +1; N%2==0 N%2 N 2 0 N = N/2 N N/2 N 2 N = 3*N +1 N 3*N +1 3*N 3 N 1 System.out.println(con.size()+1) System.out.println System.out System System.out con.size()+1 con.size() con.size con 1 String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();

   List<Integer> con = new ArrayList<>();
   while(!con.contains(N))
   {
     con.add(N);
     if(N%2==0) N = N/2;
     else N = 3*N +1;
   }
   
   System.out.println(con.size()+1);
 }
}