import java.util.ArrayList;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

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

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

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

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

  } main {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc list.add(s) list.add list s int ans = 1; ans 1 while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    } true {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    } ans++ ans int next = 0; next 0 if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      } (s % 2) == 1 (s % 2) s 2 1 {
        next = (3 * s) + 1;
      } next = (3 * s) + 1 next (3 * s) + 1 (3 * s) 3 s 1 {
        next = s / 2;
      } next = s / 2 next s / 2 s 2 if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      } list.contains(next) list.contains list next {
        System.out.println(ans);
        return;
      } System.out.println(ans) System.out.println System.out System System.out ans return; {
        s = next;
        list.add(next);
      } s = next s next list.add(next) list.add list next String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

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

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    ArrayList<Integer> list = new ArrayList<Integer>();
    int s = sc.nextInt();
    list.add(s);
    int ans = 1;

    while (true) {
      ans++;
      int next = 0;
      if ((s % 2) == 1) {
        next = (3 * s) + 1;
      } else {
        next = s / 2;
      }
      if (list.contains(next)) {
        System.out.println(ans);
        return;
      } else {
        s = next;
        list.add(next);
      }
    }

  }
}