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

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    }

    private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 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) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    }

    private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    } main {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc List<Integer> l = new ArrayList<>(); l new ArrayList<>() l.add(s) l.add l s int idx = 0; idx 0 while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        } true {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        } int a = f(l.get(idx)); a f(l.get(idx)) f l.get(idx) l.get l idx if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            } l.contains(a) l.contains l a {
                System.out.println(idx+2);
                break;
            } System.out.println(idx+2) System.out.println System.out System System.out idx+2 idx 2 break; l.add(a) l.add l a idx++ idx String[] args args private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    } f {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    } return n % 2 == 0 ? n / 2 : 3 * n + 1; n % 2 == 0 ? n / 2 : 3 * n + 1 n % 2 == 0 n % 2 n 2 0 n / 2 n 2 3 * n + 1 3 * n 3 n 1 final int n n public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    }

    private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    }
} public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    }

    private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int s = sc.nextInt();

        List<Integer> l = new ArrayList<>();
        l.add(s);
        
        int idx = 0;
        while (true) {
            int a = f(l.get(idx));
            if (l.contains(a)) {
                System.out.println(idx+2);
                break;
            }
            l.add(a);
            idx++;
        }
    }

    private static int f(final int n) {
        return n % 2 == 0 ? n / 2 : 3 * n + 1;
    }
}
