import java.util.HashMap;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  }
} import java.util.HashMap; HashMap java.util import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  } main {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 HashMap<Integer, Integer> a = new HashMap<Integer, Integer>(); a new HashMap<Integer, Integer>() int ai = s; ai s a.put(ai, 1) a.put a ai 1 for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    } ans = 2; ans = 2 ans 2 ans <= 1000000 ans 1000000 ans++ ans++ ans {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    } {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    } if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      } ai % 2 == 0 ai % 2 ai 2 0 {
        ai = ai / 2;
      } ai = ai / 2 ai ai / 2 ai 2 {
        ai = 3 * ai + 1;
      } ai = 3 * ai + 1 ai 3 * ai + 1 3 * ai 3 ai 1 if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      } a.containsKey(ai) a.containsKey a ai {
        System.out.println(ans);
        return;
      } System.out.println(ans) System.out.println System.out System System.out ans return; {
        a.put(ai, 1);
      } a.put(ai, 1) a.put a ai 1 String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  }
} Main
import java.util.HashMap;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int s = Integer.parseInt(sc.next());

    int ans = 0;
    HashMap<Integer, Integer> a = new HashMap<Integer, Integer>();

    int ai = s;
    a.put(ai, 1);

    for (ans = 2; ans <= 1000000; ans++) {
      if (ai % 2 == 0) {
        ai = ai / 2;
      } else {
        ai = 3 * ai + 1;
      }
      if (a.containsKey(ai)) {
        System.out.println(ans);
        return;
      } else {
        a.put(ai, 1);
      }
    }

  }
}