import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    } main {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc ArrayList<Number> list = new ArrayList<Number>(); list new ArrayList<Number>() list.add(s) list.add list s int count = 0; count 0 while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        } true {
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        } if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            } s%2 == 0 s%2 s 2 0 {
                s = s/2;
            } s = s/2 s s/2 s 2 {
                s = 3*s + 1;
            } s = 3*s + 1 s 3*s + 1 3*s 3 s 1 count++ count if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            } list.contains(s) list.contains list s {
                System.out.println(count+1);
                return;
            } System.out.println(count+1) System.out.println System.out System System.out count+1 count 1 return; {
                list.add(s);
            } list.add(s) list.add list s String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        ArrayList<Number> list = new ArrayList<Number>();
        list.add(s);
        int count = 0;
        while(true){
            
            if(s%2 == 0){
                s = s/2;
            }else{
                s = 3*s + 1;
            }
            count++;
            if(list.contains(s)){
                System.out.println(count+1);
                return;
            }else{
                list.add(s);
            }
        }
    }
}
