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

  
} 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 answer = 1;
    boolean isFour = false;
    if(s==1){
      System.out.println(4);
    }else if(s==2){
      System.out.println(4);
    }else if(s==4){
      System.out.println(4);
    }else{
      while(1==1){
        if(s%2==0){
          s=s/2;
        }else{
          s=3*s+1;
        }
        answer = answer +1;
        if(s==4){
          if(!isFour){
            isFour=true;
          }else{
            break;
          }
        }
      }
      System.out.println(answer);
    }
        
        
      
      
  }
  

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

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

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

  
}