import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] l = new int[10000001]; l new int[10000001] 10000001 int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int now = s; now s l[s]++ l[s] l s for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        } int i = 2; int i = 2; i 2 i++ i++ i {
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        } {
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        } int tmp = 0; tmp 0 if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            } now % 2 == 0 now % 2 now 2 0 {
                tmp = now/2;
            } tmp = now/2 tmp now/2 now 2 {
                tmp = (3*now)+1;
            } tmp = (3*now)+1 tmp (3*now)+1 (3*now) 3 now 1 if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            } l[tmp] > 0 l[tmp] l tmp 0 {
                System.out.println(i);
                break;
            } System.out.println(i) System.out.println System.out System System.out i break; {
                l[tmp]++;
                now = tmp;
            } l[tmp]++ l[tmp] l tmp now = tmp now tmp String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[10000001];
        int s = sc.nextInt();
        int now = s;
        l[s]++;
        for(int i = 2;;i++){
            int tmp = 0;
            if(now % 2 == 0){
                tmp = now/2;
            }else{
                tmp = (3*now)+1;
            }
            if(l[tmp] > 0){
                System.out.println(i);
                break;
            }else{
                l[tmp]++;
                now = tmp;
            }
        }
    }
}
