import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();

        Map<Integer, Integer> m = new HashMap<Integer, Integer>();

        int i = 1;
        int a = s;
        m.put(a, i);

        // start from i == 2
        i++;
        while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        }

    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();

        Map<Integer, Integer> m = new HashMap<Integer, Integer>();

        int i = 1;
        int a = s;
        m.put(a, i);

        // start from i == 2
        i++;
        while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        }

    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();

        Map<Integer, Integer> m = new HashMap<Integer, Integer>();

        int i = 1;
        int a = s;
        m.put(a, i);

        // start from i == 2
        i++;
        while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        }

    } run {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();

        Map<Integer, Integer> m = new HashMap<Integer, Integer>();

        int i = 1;
        int a = s;
        m.put(a, i);

        // start from i == 2
        i++;
        while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc Map<Integer, Integer> m = new HashMap<Integer, Integer>(); m new HashMap<Integer, Integer>() int i = 1; i 1 int a = s; a s m.put(a, i) m.put m a i i++ i while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        } true {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        } 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 if (m.containsKey(a)) {
                System.out.println(i);
                return;
            } m.containsKey(a) m.containsKey m a {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; m.put(a, i) m.put m a i i++ i
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();

        Map<Integer, Integer> m = new HashMap<Integer, Integer>();

        int i = 1;
        int a = s;
        m.put(a, i);

        // start from i == 2
        i++;
        while (true) {
            if (a % 2 == 0) {
                a = a / 2;
            } else {
                a = 3 * a + 1;
            }
            //System.out.println(String.format("%d %d", i, a));
            if (m.containsKey(a)) {
                System.out.println(i);
                return;
            }

            m.put(a, i);
            i++;
        }

    }

}