import java.io.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    } main {
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    } BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) int s = Integer.valueOf(bf.readLine()) s Integer.valueOf(bf.readLine()) Integer.valueOf Integer bf.readLine() bf.readLine bf m = 1; m 1 Set<Integer> number = new HashSet<>(); number new HashSet<>() while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        } true {
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        } if(!number.add(s)){
                break;
            } !number.add(s) number.add(s) number.add number s {
                break;
            } break; if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            } s%2 > 0 s%2 s 2 0 {
                s = 3*s + 1;
            } s = 3*s + 1 s 3*s + 1 3*s 3 s 1 {
                s /= 2;
            } s /= 2 s 2 m++ m System.out.println(m) System.out.println System.out System System.out m String[] args args public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    }
} Main
import java.io.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf = 
            new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.valueOf(bf.readLine()),
            m = 1;
        Set<Integer> number = new HashSet<>();
        while(true){
            if(!number.add(s)){
                break;
            }
            if(s%2 > 0){
                s = 3*s + 1;
            } else{
                s /= 2;
            }
            m++;
        }        
        System.out.println(m);
    }
}