import java.util.*;

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

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