import java.util.*;
import java.util.ArrayList;

public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	}
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	}
} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	} main {

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int ans = 0; ans 0 ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(s) list.add list s int n = 0; n 0 while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        } true {
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        } n++ n int next; next if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          } s % 2 == 0 s % 2 s 2 0 {
            next = s / 2 ;
          } next = s / 2 next s / 2 s 2 {
            next = 3*s + 1;
          } next = 3*s + 1 next 3*s + 1 3*s 3 s 1 list.add(n,next) list.add list n next s = next s next for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         } int i = 0 ; int i = 0 ; i 0 i < list.size()-1 i list.size()-1 list.size() list.size list 1 i++ i++ i {
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         } {
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         } if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           } list.get(i)==list.get(n) list.get(i) list.get list i list.get(n) list.get list n {
             ans = n;
             System.out.println(ans+1);
             return;
           } ans = n ans n System.out.println(ans+1) System.out.println System.out System System.out ans+1 ans 1 return; {
             continue;
           } continue; String[] args args public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	}
} public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	}
} Main
import java.util.*;
import java.util.ArrayList;

public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int ans = 0;
        
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);
        int n = 0;
       
        while(true){
          n++;
          int next;
          if(s % 2 == 0){
            next = s / 2 ;
          }else{
            next = 3*s + 1;
          }
          
           list.add(n,next);
           s = next;
           
          
         for(int i = 0 ; i < list.size()-1; i++){
           if(list.get(i)==list.get(n)){
             ans = n;
             System.out.println(ans+1);
             return;
           }else{
             continue;
           }
         }
        }
      
       
	}
}