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