import java.util.*;
class Main {
  public static void main(String[] args) {
     Scanner scan = new Scanner(System.in);
    int n= scan.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    int i = 1 ;
    while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    }
    
    
  }
  
  static int fe(int n){
    return n/2 ;
  }
  
  static int fo(int n){
    return 3*n + 1 ; 
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
     Scanner scan = new Scanner(System.in);
    int n= scan.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    int i = 1 ;
    while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    }
    
    
  }
  
  static int fe(int n){
    return n/2 ;
  }
  
  static int fo(int n){
    return 3*n + 1 ; 
  }
} Main public static void main(String[] args) {
     Scanner scan = new Scanner(System.in);
    int n= scan.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    int i = 1 ;
    while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    }
    
    
  } main {
     Scanner scan = new Scanner(System.in);
    int n= scan.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    int i = 1 ;
    while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    }
    
    
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n= scan.nextInt(); n scan.nextInt() scan.nextInt scan ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() int i = 1 ; i 1 while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    } true {
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    } if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      } a.contains(n) a.contains a n {
        System.out.println(i);
        break;
      } System.out.println(i) System.out.println System.out System System.out i break; {
        a.add(n);
      } a.add(n) a.add a n if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      } n %2 == 0 n %2 n 2 0 {
        n = fe(n);
      } n = fe(n) n fe(n) fe n {
        n = fo(n);
      } n = fo(n) n fo(n) fo n i++ i String[] args args static int fe(int n){
    return n/2 ;
  } fe {
    return n/2 ;
  } return n/2 ; n/2 n 2 int n n static int fo(int n){
    return 3*n + 1 ; 
  } fo {
    return 3*n + 1 ; 
  } return 3*n + 1 ; 3*n + 1 3*n 3 n 1 int n n
import java.util.*;
class Main {
  public static void main(String[] args) {
     Scanner scan = new Scanner(System.in);
    int n= scan.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    int i = 1 ;
    while(true){
      
      
      //System.out.println(n);
      if(a.contains(n)){
        System.out.println(i);
        break;
      }else{
        a.add(n);
      }
      
      if( n %2 == 0){
        n = fe(n);
      }else{
        n = fo(n);
      }
      i++;
    }
    
    
  }
  
  static int fe(int n){
    return n/2 ;
  }
  
  static int fo(int n){
    return 3*n + 1 ; 
  }
}
