import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        List<Integer> a = new ArrayList<>();
        while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        }
        System.out.println(a.size()+1);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        List<Integer> a = new ArrayList<>();
        while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        }
        System.out.println(a.size()+1);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        List<Integer> a = new ArrayList<>();
        while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        }
        System.out.println(a.size()+1);
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        List<Integer> a = new ArrayList<>();
        while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        }
        System.out.println(a.size()+1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc List<Integer> a = new ArrayList<>(); a new ArrayList<>() while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        } true {
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        } if(a.contains(s))
            break; a.contains(s) a.contains a s break; a.add(s) a.add a s s = s%2 == 0 ? s/2 : s*3+1 s s%2 == 0 ? s/2 : s*3+1 s%2 == 0 s%2 s 2 0 s/2 s 2 s*3+1 s*3 s 3 1 System.out.println(a.size()+1) System.out.println System.out System System.out a.size()+1 a.size() a.size a 1 String[] args args
import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        List<Integer> a = new ArrayList<>();
        while(true){
            if(a.contains(s))
            break;
            a.add(s);
            s = s%2 == 0 ? s/2 : s*3+1;
        }
        System.out.println(a.size()+1);
    }
}