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