import java.util.Scanner;

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

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    }
} Main public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a1 = sc.nextInt(); a1 sc.nextInt() sc.nextInt sc int an = a1; an a1 int n = 1; n 1 int anArray[] = new int[1000000]; anArray new int[1000000] 1000000 anArray[0] = an anArray[0] anArray 0 an for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        } int i = 0; int i = 0; i 0 i++ i++ i {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        } {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        } n += 1 n 1 if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            } an % 2 == 0 an % 2 an 2 0 {
                an = an / 2;
            } an = an / 2 an an / 2 an 2 {
                an = 3 * an + 1;
            } an = 3 * an + 1 an 3 * an + 1 3 * an 3 an 1 for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            } {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            } if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                } an == anArray[j] an anArray[j] anArray j {
                    System.out.println(n);
                    System.exit(0);
                } System.out.println(n) System.out.println System.out System System.out n System.exit(0) System.exit System 0 anArray[n - 1] = an anArray[n - 1] anArray n - 1 n 1 an String[] args args public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    }
} public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    }
} Main
import java.util.Scanner;

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

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            for (int j = 0; j < i; j++) {
                if (an == anArray[j]) {
                    System.out.println(n);
                    System.exit(0);
                }
            }

            anArray[n - 1] = an;
        }
    }
}