/*
按照题目要求来就行
*/
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int steep = 0;
while(n != 1){
++ steep;
n = n % 2 == 0 ? n /2 : (3 * n + 1) / 2;
}
System.out.println(steep);
}
}