import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    } main {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    } Map<Integer,Integer> po=new HashMap<Integer,Integer>(); po new HashMap<Integer,Integer>() Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int count=1; count 1 for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        } ; !(po.containsKey(n)) (po.containsKey(n)) po.containsKey po n count++ count++ count {
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        } {
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        } po.put(n,n) po.put po n n if(n%2==0)n/=2;
            else n=n*3+1; n%2==0 n%2 n 2 0 n/=2 n 2 n=n*3+1 n n*3+1 n*3 n 3 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Map<Integer,Integer> po=new HashMap<Integer,Integer>();
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=1;
        for(;!(po.containsKey(n));count++){
            po.put(n,n);
            if(n%2==0)n/=2;
            else n=n*3+1;
        }
        System.out.println(count);
    }
}
