import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  } main {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int count = 0; count 0 int count2 = 0; count2 0 if(a == 1) count--; a == 1 a 1 count-- count if(a == 2) count -= 2; a == 2 a 2 count -= 2 count 2 while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    } count2 < 2 count2 2 {
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    } count++ count if(a == 4) count2++; a == 4 a 4 count2++ count2 if(a % 2 == 0) a /= 2;
      	else a = a*3+1; a % 2 == 0 a % 2 a 2 0 a /= 2 a 2 a = a*3+1 a a*3+1 a*3 a 3 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  }
} Main
import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int a = sc.nextInt();
    int count = 0;
    int count2 = 0;
    
    if(a == 1) count--;
    if(a == 2) count -= 2;
    
    while(count2 < 2){
      	count++;
      	if(a == 4) count2++;
		if(a % 2 == 0) a /= 2;
      	else a = a*3+1;     	
    }
    
    System.out.println(count);

  }
}
