import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    } main {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long s = scanner.nextInt(); s scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner long index = 1; index 1 if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        } s == 1 || s == 2 s == 1 s 1 s == 2 s 2 {
            System.out.println(4);
            return;
        } System.out.println(4) System.out.println System.out System System.out 4 return; while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        } true {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        } if (s == 4) {
                break;
            } s == 4 s 4 {
                break;
            } break; if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            } s % 2 == 0 s % 2 s 2 0 {
                s = s / 2;
                index++;
            } s = s / 2 s s / 2 s 2 index++ index {
                s = 3 * s + 1;
                index++;
            } s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 index++ index System.out.println(index + 3) System.out.println System.out System System.out index + 3 index 3 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long s = scanner.nextInt();
        scanner.close();

        long index = 1;

        if (s == 1 || s == 2) {
            System.out.println(4);
            return;
        }

        while (true) {
            if (s == 4) {
                break;
            }

            if (s % 2 == 0) {
                s = s / 2;
                index++;
            } else {
                s = 3 * s + 1;
                index++;
            }

        }

        System.out.println(index + 3);

    }
}
