import java.util.*;

public class Main{

  public static int f(int n){
    if(n % 2 == 0){
      return n / 2;
    }else{
      return 3 * n + 1;
    }
  }

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

  public static int f(int n){
    if(n % 2 == 0){
      return n / 2;
    }else{
      return 3 * n + 1;
    }
  }

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

  public static int f(int n){
    if(n % 2 == 0){
      return n / 2;
    }else{
      return 3 * n + 1;
    }
  }

  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s;
    int n = 0;
    while(s != 4){
      s = f(s);
      n++;
    }
    n++;
    if(a == 1 || a == 2){
      System.out.println(4);
    }else
      System.out.println(n + 3);
  }
} public class Main{

  public static int f(int n){
    if(n % 2 == 0){
      return n / 2;
    }else{
      return 3 * n + 1;
    }
  }

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

public class Main{

  public static int f(int n){
    if(n % 2 == 0){
      return n / 2;
    }else{
      return 3 * n + 1;
    }
  }

  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s;
    int n = 0;
    while(s != 4){
      s = f(s);
      n++;
    }
    n++;
    if(a == 1 || a == 2){
      System.out.println(4);
    }else
      System.out.println(n + 3);
  }
}
