import java.util.*;

public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    }
} Main public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    } main {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int m =0; m 0 int[] a = new int[10000]; a new int[10000] 10000 a[0] = s a[0] a 0 s for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      } int i=1; int i=1; i 1 i<10000 i 10000 i++ i++ i {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      } {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      } if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        } s % 2 == 0 s % 2 s 2 0 {
          s /= 2;
          a[i] = s;
        } s /= 2 s 2 a[i] = s a[i] a i s {
          s = s * 3 + 1;
          a[i] = s;
        } s = s * 3 + 1 s s * 3 + 1 s * 3 s 3 1 a[i] = s a[i] a i s for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        } int j=0; int j=0; j 0 j<i j i j++ j++ j {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        } {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        } if(a[i] == a[j]) {
            m = i+1;
            break;
          } a[i] == a[j] a[i] a i a[j] a j {
            m = i+1;
            break;
          } m = i+1 m i+1 i 1 break; if (m != 0) break; m != 0 m 0 break; 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) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    }
} public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int s = sc.nextInt();
      int m =0;
      int[] a = new int[10000];
      a[0] = s;
      for (int i=1; i<10000; i++) {
        if(s % 2 == 0) {
          s /= 2;
          a[i] = s;
        } else {
          s = s * 3 + 1;
          a[i] = s;
        }
        for (int j=0; j<i; j++) {
          if(a[i] == a[j]) {
            m = i+1;
            break;
          }
        }
        if (m != 0) break;
      }
      System.out.println(m); 
    }
}