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

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    }

} import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        } else {
            return 3 * n + 1;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    }

} Main static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        } else {
            return 3 * n + 1;
        }
    } f {
        if (n % 2 == 0) {
            return n / 2;
        } else {
            return 3 * n + 1;
        }
    } if (n % 2 == 0) {
            return n / 2;
        } else {
            return 3 * n + 1;
        } n % 2 == 0 n % 2 n 2 0 {
            return n / 2;
        } return n / 2; n / 2 n 2 {
            return 3 * n + 1;
        } 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 = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int[] a = new int[1000005]; a new int[1000005] 1000005 ArrayList<Integer> array = new ArrayList<>(); array new ArrayList<>() for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        } int i = 0; int i = 0; i 0 i < 1000005 i 1000005 i++ i++ i {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        } {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        } if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            } i == 0 i 0 a[i] = s a[i] a i s {
                a[i] = f(a[i - 1]);
            } a[i] = f(a[i - 1]) a[i] a i f(a[i - 1]) f a[i - 1] a i - 1 i 1 if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]); array.contains(a[i]) array.contains array a[i] a i {
                System.out.println(i + 1);
                return;
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; array.add(a[i]) array.add array a[i] a i String[] args args public class Main {
    static int f(int n) {
        if (n % 2 == 0) {
            return n / 2;
        } else {
            return 3 * n + 1;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    }

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    }

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

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int[] a = new int[1000005];
        ArrayList<Integer> array = new ArrayList<>();
        for (int i = 0; i < 1000005; i++) {
            if (i == 0)
                a[i] = s;
            else {
                a[i] = f(a[i - 1]);
            }
            if (array.contains(a[i])) {
                System.out.println(i + 1);
                return;
            } else
                array.add(a[i]);
        }
    }

}
