import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int s = Integer.parseInt(sc.next());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    }
} 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());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int s = Integer.parseInt(sc.next());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    } main {

        Scanner sc = new Scanner(System.in);
        int s = Integer.parseInt(sc.next());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    } 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 int n = 1; n 1 if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        } s == 1 || s == 2 s == 1 s 1 s == 2 s 2 {
            n = 4;
        } n = 4 n 4 {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        } while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            } s != 4 s 4 {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            } if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                } s % 2 == 0 s % 2 s 2 0 {
                    s /= 2;
                } s /= 2 s 2 {
                    s = s * 3 + 1;
                } s = s * 3 + 1 s s * 3 + 1 s * 3 s 3 1 n += 1 n 1 n += 3 n 3 System.out.print(n) System.out.print System.out System System.out n String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int s = Integer.parseInt(sc.next());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int s = Integer.parseInt(sc.next());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    }
} 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());
        int n = 1;
        if (s == 1 || s == 2) {
            n = 4;
        } else {
            while (s != 4) {
                if (s % 2 == 0) {
                    s /= 2;
                } else {
                    s = s * 3 + 1;
                }
                n += 1;
            }
            n += 3;
        }
        System.out.print(n);
    }
}