import java.util.*;

public class Main {


    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    }
} import java.util.*; util.* java public class Main {


    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    } main {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int s    = scan.nextInt(); s scan.nextInt() scan.nextInt scan if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        } s == 4 || s == 2 || s == 1 s == 4 || s == 2 || s == 1 s == 4 s 4 s == 2 s 2 s == 1 s 1 {
            System.out.println(4);
            return;
        } System.out.println(4) System.out.println System.out System System.out 4 return; int input=s; input s int output=0; output 0 int i = 1; i 1 while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        } true {

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        } i++ i if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            } input % 2 == 0 input % 2 input 2 0 {

                output = input/2;

            } output = input/2 output input/2 input 2 {

                output = input*3 + 1;

            } output = input*3 + 1 output input*3 + 1 input*3 input 3 1 if(output == 4){
                System.out.println(i + 3);
                return;
            } output == 4 output 4 {
                System.out.println(i + 3);
                return;
            } System.out.println(i + 3) System.out.println System.out System System.out i + 3 i 3 return; input = output input output String[] args args public class Main {


    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    }
} public class Main {


    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    }
} Main
import java.util.*;

public class Main {


    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int s    = scan.nextInt();


        if(s == 4 || s == 2 || s == 1){
            System.out.println(4);
            return;
        }


        int input=s;
        int output=0;
        int i = 1;
        while(true){

            i++;

            if(input % 2 == 0 ){

                output = input/2;

            }else{

                output = input*3 + 1;

            }

            if(output == 4){
                System.out.println(i + 3);
                return;
            }

            input = output;
        }
    }
}
