import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        } solve {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        } int s = Integer.parseInt(in.next()); s Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int ans = 0; ans 0 List<Integer> collats = new ArrayList<>(); collats new ArrayList<>() collats.add(s) collats.add collats s int i = 0; i 0 while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            } true {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            } i++ i int tmp = fn(collats.get(i - 1)); tmp fn(collats.get(i - 1)) fn collats.get(i - 1) collats.get collats i - 1 i 1 if (collats.contains(tmp)) break; collats.contains(tmp) collats.contains collats tmp break; collats.add(tmp) collats.add collats tmp out.println(++i) out.println out ++i i int testNumber testNumber Scanner in in PrintWriter out out public static int fn(int n) {
            if (n % 2 == 0) {
                return n / 2;
            } else {
                return 3 * n + 1;
            }
        } fn {
            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 class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int s = Integer.parseInt(in.next());
            int ans = 0;

            List<Integer> collats = new ArrayList<>();

            collats.add(s);
            int i = 0;
            while (true) {
                i++;
                int tmp = fn(collats.get(i - 1));

                if (collats.contains(tmp)) break;

                collats.add(tmp);

            }

            // 出力
            out.println(++i);

        }

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

    }
}

