import java.util.*;

public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  }

} import java.util.*; util.* java public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  }

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  } main {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  } int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int a = s; a s for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    } int i=0; int i=0; i 0 i<=1000000 i 1000000 i++ i++ i {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    } {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    } if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      } a == 4 || a == 2 || a == 1 a == 4 || a == 2 || a == 1 a == 4 a 4 a == 2 a 2 a == 1 a 1 {
        System.out.println(i + 4);
        return;
      } System.out.println(i + 4) System.out.println System.out System System.out i + 4 i 4 return; if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      } a % 2 == 0 a % 2 a 2 0 {
        a = a / 2;
      } a = a / 2 a a / 2 a 2 {
        a = 3 * a + 1;
      } a = 3 * a + 1 a 3 * a + 1 3 * a 3 a 1 String[] args args public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  }

} public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  }

} Main
import java.util.*;

public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {

    int s = sc.nextInt();

    int a = s;
    for (int i=0; i<=1000000; i++) {
      if (a == 4 || a == 2 || a == 1) {
        System.out.println(i + 4);
        return;
      }
      if (a % 2 == 0) {
        a = a / 2;
      } else {
        a = 3 * a + 1;
      }
    }

  }

}