import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	}
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	} main {
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int input = sc.nextInt(); input sc.nextInt() sc.nextInt sc int count = 1; count 1 ArrayList<Integer>array = new ArrayList<Integer>(); array new ArrayList<Integer>() int newNum = 0; newNum 0 while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      } true {
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      } if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        } count==1 count 1 {
          newNum = input;
        } newNum = input newNum input {
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        } int num = array.get(array.size()-1); num array.get(array.size()-1) array.get array array.size()-1 array.size() array.size array 1 if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          } num%2==0 num%2 num 2 0 {
            newNum= num/2;
          } newNum= num/2 newNum num/2 num 2 {
            newNum= num*3+1;
          } newNum= num*3+1 newNum num*3+1 num*3 num 3 1 if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        } array.contains(newNum) array.contains array newNum {
          break;
        } break; {
          array.add(newNum);
          count++;
        } array.add(newNum) array.add array newNum count++ count 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 input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	}
} public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      
      int input = sc.nextInt();
      int count = 1;
      ArrayList<Integer>array = new ArrayList<Integer>();
      int newNum = 0;
      
      while(true){
        if(count==1){
          newNum = input;
        }else{
          int num = array.get(array.size()-1);
          if(num%2==0){
            newNum= num/2;
          }else{
            newNum= num*3+1;
          }
        }
        if(array.contains(newNum)){
          break;
        }else{
          array.add(newNum);
          count++;
        }
      }
      System.out.println(count);
	}
}