import java.util.*;

public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    }
} Main public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    } main {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

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

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    }
} public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(s);

        int index = 1;
        while(true) {
            index++;
            int value = s % 2 == 0 ? s / 2 : 3 * s + 1;
            if (list.contains(value)) {
                break;
            } else {
                list.add(value);
                s = value;
            }
        }

        // 出力
        System.out.println(index);
    }
}