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