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

public class Main {

    private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    }

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

    private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    }

} Main private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    } function {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    } if (n % 2 == 0) {
            return n / 2;
        } n % 2 == 0 n % 2 n 2 0 {
            return n / 2;
        } return n / 2; n / 2 n 2 return 3 * n + 1; 3 * n + 1 3 * n 3 n 1 int n n public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int a = 0; a 0 List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        } int i = 1; int i = 1; i 1 i < 1000000 i 1000000 i++ i++ i {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        } {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        } if (i == 1) {
                a = s;
                list.add(a);
                continue;
            } i == 1 i 1 {
                a = s;
                list.add(a);
                continue;
            } a = s a s list.add(a) list.add list a continue; a = function(a) a function(a) function a for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            } int j = 0; int j = 0; j 0 j < i - 1 j i - 1 i 1 j++ j++ j {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            } {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            } if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                } a == list.get(j) a list.get(j) list.get list j {
                    System.out.println(i);
                    return;
                } System.out.println(i) System.out.println System.out System System.out i return; list.add(a) list.add list a String[] args args public class Main {

    private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    }

} public class Main {

    private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    }

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

public class Main {

    private static int function(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = 0;
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i < 1000000; i++) {
            if (i == 1) {
                a = s;
                list.add(a);
                continue;
            }
            a = function(a);
            for (int j = 0; j < i - 1; j++) {
                if (a == list.get(j)) {
                    System.out.println(i);
                    return;
                }
            }
            list.add(a);
        }
    }

}
