import java.util.*;
 
class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
      	int co = 0;
      
      while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      }
      
        System.out.println(co);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
      	int co = 0;
      
      while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      }
      
        System.out.println(co);
    }
} Main public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
      	int co = 0;
      
      while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      }
      
        System.out.println(co);
    } main {
      
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
      	int co = 0;
      
      while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      }
      
        System.out.println(co);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int co = 0; co 0 while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      } true {
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      } co++ co if(s==4||s==2||s==1){
          co=co+3;
          break;
        } s==4||s==2||s==1 s==4||s==2||s==1 s==4 s 4 s==2 s 2 s==1 s 1 {
          co=co+3;
          break;
        } co=co+3 co co+3 co 3 break; if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;} s%2==0 s%2 s 2 0 {s=s/2;} s=s/2 s s/2 s 2 if(s%2!=0){s=(s*3)+1;} s%2!=0 s%2 s 2 0 {s=(s*3)+1;} s=(s*3)+1 s (s*3)+1 (s*3) s 3 1 System.out.println(co) System.out.println System.out System System.out co String[] args args
import java.util.*;
 
class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
      	int co = 0;
      
      while(true){
        co++;
		if(s==4||s==2||s==1){
          co=co+3;
          break;
        }
        if(s%2==0){s=s/2;}
        else if(s%2!=0){s=(s*3)+1;}
      }
      
        System.out.println(co);
    }
}