import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  } main {
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  } try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    } catch (Exception e) {
      System.out.println("out");
    } Exception e {
      System.out.println("out");
    } System.out.println("out") System.out.println System.out System System.out "out" {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s s m=0; m 0 LinkedList<Integer> a = new LinkedList<Integer>(); a new LinkedList<Integer>() s=Integer.parseInt(sc.next()) s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc a.add(s) a.add a s System.out.println(m) System.out.println System.out System System.out m String[] args args public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main
import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int s, m=0;
      LinkedList<Integer> a = new LinkedList<Integer>();
      
      s=Integer.parseInt(sc.next());
      a.add(s);
      out: for(int i=0; i<=1000000; i++){
        if(a.get(i)%2==0){
          a.add(a.get(i)/2);
        }else{
          a.add(a.get(i)*3+1);
        }
        for(int j=0; j<i+1; j++){
          if(a.get(i+1)==a.get(j)){
            m=i+2;
            break out;
          }
        }
      }

      System.out.println(m);
      
                
      }catch (Exception e) {
      System.out.println("out");
    }
  }
}
