import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
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);
        ABC116_B solver = new ABC116_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    }
}
 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.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);
        ABC116_B solver = new ABC116_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    }
} 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);
        ABC116_B solver = new ABC116_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);
        ABC116_B solver = new ABC116_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) ABC116_B solver = new ABC116_B(); solver new ABC116_B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    } ABC116_B public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        } solve {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        } int n = in.nextInt(); n in.nextInt() in.nextInt in ArrayList<Integer> array = new ArrayList<Integer>(); array new ArrayList<Integer>() array.add(n) array.add array n int a = n; a n while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            } true {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            } if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                } a % 2 == 0 a % 2 a 2 0 {
                    a = a / 2;
                } a = a / 2 a a / 2 a 2 {
                    a = a * 3 + 1;
                } a = a * 3 + 1 a a * 3 + 1 a * 3 a 3 1 if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                } array.contains(a) array.contains array a {
                    out.print(array.size() + 1);
                    break;
                } out.print(array.size() + 1) out.print out array.size() + 1 array.size() array.size array 1 break; array.add(a) array.add array a int testNumber testNumber Scanner in in PrintWriter out out 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);
        ABC116_B solver = new ABC116_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    }
} 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);
        ABC116_B solver = new ABC116_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
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);
        ABC116_B solver = new ABC116_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC116_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Integer> array = new ArrayList<Integer>();
            array.add(n);
            int a = n;

            while (true) {
                if (a % 2 == 0) {
                    a = a / 2;
                } else {
                    a = a * 3 + 1;
                }
                if (array.contains(a)) {
                    out.print(array.size() + 1);
                    break;
                }
                array.add(a);
            }
        }

    }
}

