import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String inputString = sc.nextLine();
        int s = Integer.valueOf(inputString);
        if(s==4 || s==2 || s==1 ) {
            System.out.println("4");
            return;
        }
        int lastNumber = s;
        int i = 2;
        while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        }
    }

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

    }

} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String inputString = sc.nextLine();
        int s = Integer.valueOf(inputString);
        if(s==4 || s==2 || s==1 ) {
            System.out.println("4");
            return;
        }
        int lastNumber = s;
        int i = 2;
        while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        }
    }

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

    }

} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String inputString = sc.nextLine();
        int s = Integer.valueOf(inputString);
        if(s==4 || s==2 || s==1 ) {
            System.out.println("4");
            return;
        }
        int lastNumber = s;
        int i = 2;
        while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String inputString = sc.nextLine();
        int s = Integer.valueOf(inputString);
        if(s==4 || s==2 || s==1 ) {
            System.out.println("4");
            return;
        }
        int lastNumber = s;
        int i = 2;
        while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String inputString = sc.nextLine(); inputString sc.nextLine() sc.nextLine sc int s = Integer.valueOf(inputString); s Integer.valueOf(inputString) Integer.valueOf Integer inputString 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 lastNumber = s; lastNumber s int i = 2; i 2 while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        } true {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        } int thisNumber = function(lastNumber); thisNumber function(lastNumber) function lastNumber if(thisNumber==4) {
                System.out.println(i+3);
                break;
            } thisNumber==4 thisNumber 4 {
                System.out.println(i+3);
                break;
            } System.out.println(i+3) System.out.println System.out System System.out i+3 i 3 break; lastNumber = thisNumber lastNumber thisNumber i++ i String args[] args private static int function(int n) {
        if(n%2==0){
            return n/2;
        }else{
            return 3*n+1;
        }

    } function {
        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
import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String inputString = sc.nextLine();
        int s = Integer.valueOf(inputString);
        if(s==4 || s==2 || s==1 ) {
            System.out.println("4");
            return;
        }
        int lastNumber = s;
        int i = 2;
        while(true) {
            int thisNumber = function(lastNumber);
            if(thisNumber==4) {
                System.out.println(i+3);
                break;
            }
            lastNumber = thisNumber;
            i++;
        }
    }

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

    }

}