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

public class Main {
    public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    }
} Main public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    } main {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    } int s = new Scanner(System.in).nextInt(); s new Scanner(System.in).nextInt() new Scanner(System.in).nextInt new Scanner(System.in) int i = 0; i 0 List<Integer> a = new ArrayList<>(); a new ArrayList<>() for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        } int j = s; int j = s; j s !a.contains(j) a.contains(j) a.contains a j i++ i++ i {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        } {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        } a.add(j) a.add a j j = j % 2 == 0 ? j / 2 : j * 3 + 1 j j % 2 == 0 ? j / 2 : j * 3 + 1 j % 2 == 0 j % 2 j 2 0 j / 2 j 2 j * 3 + 1 j * 3 j 3 1 System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        int s = new Scanner(System.in).nextInt();
        int i = 0;
        List<Integer> a = new ArrayList<>();
        for (int j = s; !a.contains(j); i++) {
            a.add(j);
            j = j % 2 == 0 ? j / 2 : j * 3 + 1;
        }
        System.out.println(i + 1);
    }
}