

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    }

    static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.HashSet; HashSet java.util import java.util.Random; Random java.util import java.util.Set; Set java.util import java.util.StringTokenizer; StringTokenizer java.util public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    }

    static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
} Main public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    } main {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    } final FastScanner fs = new FastScanner(); fs new FastScanner() int s = fs.nextInt(); s fs.nextInt() fs.nextInt fs Set<Integer> seen = new HashSet<>(); seen new HashSet<>() seen.add(s) seen.add seen s for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        } int i = 1; int i = 1; i 1 true i++ i++ i {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        } {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        } if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            } s % 2 != 0 s % 2 s 2 0 {
                s = (3 * s) + 1;
            } s = (3 * s) + 1 s (3 * s) + 1 (3 * s) 3 s 1 {
                s /= 2;
            } s /= 2 s 2 if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            } !seen.add(s) seen.add(s) seen.add seen s {
                System.out.println(i + 1);
                break;
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 break; String[] args args static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    } Utils public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        } shuffleSort {
            shuffle(arr);
            Arrays.sort(arr);
        } shuffle(arr) shuffle arr Arrays.sort(arr) Arrays.sort Arrays arr int[] arr arr public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        } shuffleSort {
            shuffle(arr);
            Arrays.sort(arr);
        } shuffle(arr) shuffle arr Arrays.sort(arr) Arrays.sort Arrays arr long[] arr arr public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        } shuffle {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        } final Random r = new Random(); r new Random() for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } int i = 0; int i = 0; i 0 i <= arr.length - 2 i arr.length - 2 arr.length arr arr.length 2 i++ i++ i {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } final int j = i + r.nextInt(arr.length - i); j i + r.nextInt(arr.length - i) i r.nextInt(arr.length - i) r.nextInt r arr.length - i arr.length arr arr.length i swap(arr, i, j) swap arr i j int[] arr arr public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        } shuffle {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        } final Random r = new Random(); r new Random() for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } int i = 0; int i = 0; i 0 i <= arr.length - 2 i arr.length - 2 arr.length arr arr.length 2 i++ i++ i {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            } final int j = i + r.nextInt(arr.length - i); j i + r.nextInt(arr.length - i) i r.nextInt(arr.length - i) r.nextInt r arr.length - i arr.length arr arr.length i swap(arr, i, j) swap arr i j long[] arr arr public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        } swap {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        } final int t = arr[i]; t arr[i] arr i arr[i] = arr[j] arr[i] arr i arr[j] arr j arr[j] = t arr[j] arr j t int[] arr arr int i i int j j public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        } swap {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        } final long t = arr[i]; t arr[i] arr i arr[i] = arr[j] arr[i] arr i arr[j] arr j arr[j] = t arr[j] arr j t long[] arr arr int i i int j j private Utils() {} Utils {} static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    } FastScanner BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(""); st new StringTokenizer("") private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } IOException e {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        } nextIntArray {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        } final int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) { a[i] = nextInt(); } int i = 0; int i = 0; i 0 i < n i n i++ i++ i { a[i] = nextInt(); } { a[i] = nextInt(); } a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        } nextLongArray {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        } final long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++) { a[i] = nextLong(); } int i = 0; int i = 0; i 0 i < n i n i++ i++ i { a[i] = nextLong(); } { a[i] = nextLong(); } a[i] = nextLong() a[i] a i nextLong() nextLong return a; a int n n public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    }

    static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
} public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    }

    static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int s = fs.nextInt();
        Set<Integer> seen = new HashSet<>();
        seen.add(s);
        for (int i = 1; true; i++) {
            if (s % 2 != 0) {
                s = (3 * s) + 1;
            } else {
                s /= 2;
            }
            if (!seen.add(s)) {
                System.out.println(i + 1);
                break;
            }
        }
    }

    static final class Utils {
        public static void shuffleSort(int[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffle(int[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void shuffle(long[] arr) {
            final Random r = new Random();

            for (int i = 0; i <= arr.length - 2; i++) {
                final int j = i + r.nextInt(arr.length - i);
                swap(arr, i, j);
            }
        }

        public static void swap(int[] arr, int i, int j) {
            final int t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        public static void swap(long[] arr, int i, int j) {
            final long t = arr[i];
            arr[i] = arr[j];
            arr[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
}
