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

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    }

    static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 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) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    }

    static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    } main {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int S = Integer.parseInt(s.next()); S Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s List<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(S) list.add list S for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        } int i = 1; int i = 1; i 1 i++ i++ i {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        } {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        } int n = f(list.get(i - 1)); n f(list.get(i - 1)) f list.get(i - 1) list.get list i - 1 i 1 if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            } list.contains(n) list.contains list n {
                System.out.println(i + 1);
                return;
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; list.add(n) list.add list n if (i > 10000) {
                System.out.println(i);
                return;
            } i > 10000 i 10000 {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; String[] args args static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 3 * n + 1;
    } f {
        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 class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    }

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

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    }

    static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        }
        return 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) {
        Scanner s = new Scanner(System.in);
        int S = Integer.parseInt(s.next());
        List<Integer> list = new ArrayList<>();
        list.add(S);
        for (int i = 1;; i++) {
            int n = f(list.get(i - 1));
            if (list.contains(n)) {
                System.out.println(i + 1);
                return;
            }
            list.add(n);
            if (i > 10000) {
                System.out.println(i);
                return;
            }
        }
    }

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