import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc if(s == 1) {
            System.out.println(4);
            return;
        } s == 1 s 1 {
            System.out.println(4);
            return;
        } System.out.println(4) System.out.println System.out System System.out 4 return; if(s == 2) {
            System.out.println(4);
            return;
        } s == 2 s 2 {
            System.out.println(4);
            return;
        } System.out.println(4) System.out.println System.out System System.out 4 return; int ans = 1; ans 1 while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        } true {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        } if(s == 1) {
                ans++;
                break;
            } s == 1 s 1 {
                ans++;
                break;
            } ans++ ans break; 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 ans++ ans 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 s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        if(s == 1) {
            System.out.println(4);
            return;
        }
        if(s == 2) {
            System.out.println(4);
            return;
        }
        int ans = 1;
        while(true) {
            if(s == 1) {
                ans++;
                break;
            }
            if(s % 2 == 0) {
                s /= 2;
            } else {
                s = s * 3 + 1;
            }
            ans++;
        }
        System.out.println(ans);
    }
}