 import java.util.*;

 public class Main {
     public static void main(String[] args) {
         new Main().execute();
     }

     public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     }

     private int f(int n) {
         if (n % 2 == 0) {
             return n / 2;
         } else {
             return 3 * n + 1;
         }
     }
 } import java.util.*; util.* java public class Main {
     public static void main(String[] args) {
         new Main().execute();
     }

     public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     }

     private int f(int n) {
         if (n % 2 == 0) {
             return n / 2;
         } else {
             return 3 * n + 1;
         }
     }
 } Main public static void main(String[] args) {
         new Main().execute();
     } main {
         new Main().execute();
     } new Main().execute() new Main().execute new Main() String[] args args public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     } execute {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc List<Integer> a = new ArrayList<>(); a new ArrayList<>() for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         } int i = 2; int i = 2; i 2 i <= 1000000 i 1000000 i++ i++ i {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         } {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         } a.add(s) a.add a s s = f(s) s f(s) f s if (a.contains(s)) {
                 System.out.println(i);
                 return;
             } a.contains(s) a.contains a s {
                 System.out.println(i);
                 return;
             } System.out.println(i) System.out.println System.out System System.out i return; private 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 class Main {
     public static void main(String[] args) {
         new Main().execute();
     }

     public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     }

     private int f(int n) {
         if (n % 2 == 0) {
             return n / 2;
         } else {
             return 3 * n + 1;
         }
     }
 } public class Main {
     public static void main(String[] args) {
         new Main().execute();
     }

     public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     }

     private int f(int n) {
         if (n % 2 == 0) {
             return n / 2;
         } else {
             return 3 * n + 1;
         }
     }
 } Main
 import java.util.*;

 public class Main {
     public static void main(String[] args) {
         new Main().execute();
     }

     public void execute() {
         Scanner sc = new Scanner(System.in);
         int s = sc.nextInt();
         List<Integer> a = new ArrayList<>();
         for (int i = 2; i <= 1000000; i++) {
             a.add(s);
             s = f(s);
             if (a.contains(s)) {
                 System.out.println(i);
                 return;
             }
         }
     }

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