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

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

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    }

}








 import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    }

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

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    } main {
        Scanner sc = new Scanner(System.in);

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc List<Integer> a = new ArrayList<>(); a new ArrayList<>() a.add(s) a.add a s int number = 0; number 0 System.out.println(number + 1) System.out.println System.out System System.out number + 1 number 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    }

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

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    }

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

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

        int s = sc.nextInt();

        List<Integer> a = new ArrayList<>();
        a.add(s);

        int number = 0;

        outside:
        while (s > 0) {
            if (s % 2 == 0) {
                s = s / 2;
                number++;

                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            } else {
                s = 3 * s + 1;
                number++;
               
                if (a.contains(s)) {
                    break outside;
                } else {
                    a.add(s);
                }
            }
        }


        System.out.println(number + 1);
    }

}









