import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[1000000]; a new int[1000000] 1000000 a[0] = sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc boolean equalFlag = false; equalFlag false int ans = 0; ans 0 for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        } int i = 0; int i = 0; i 0 i<1000000 i 1000000 i++ i++ i {
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        } {
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        } if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            } a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
                a[i+1] = a[i]/2;
            } a[i+1] = a[i]/2 a[i+1] a i+1 i 1 a[i]/2 a[i] a i 2 {
                a[i+1] = a[i]*3+1;
            } a[i+1] = a[i]*3+1 a[i+1] a i+1 i 1 a[i]*3+1 a[i]*3 a[i] a i 3 1 for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            } int j = 0; int j = 0; j 0 j<i+1 j i+1 i 1 j++ j++ j {
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            } {
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            } if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                } a[i+1] == a[j] a[i+1] a i+1 i 1 a[j] a j {
                    equalFlag = true;
                    ans = i+2;
                    break;
                } equalFlag = true equalFlag true ans = i+2 ans i+2 i 2 break; if(equalFlag == true){
                break;
            } equalFlag == true equalFlag true {
                break;
            } break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000000];
        a[0] = sc.nextInt();

        boolean equalFlag = false;
        int ans = 0;
        for(int i = 0;i<1000000;i++){
            if(a[i] % 2 == 0){
                a[i+1] = a[i]/2;
            }else{
                a[i+1] = a[i]*3+1;
            }
            for(int j = 0;j<i+1;j++){
                if(a[i+1] == a[j]){
                    equalFlag = true;
                    ans = i+2;
                    break;
                }
            }
            if(equalFlag == true){
                break;
            }
        }

        System.out.println(ans);
    }
}