
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		}
		
		System.out.println(list.size() + 1);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		}
		
		System.out.println(list.size() + 1);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		}
		
		System.out.println(list.size() + 1);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		}
		
		System.out.println(list.size() + 1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<>(); list new ArrayList<>() while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		} !list.contains(n) list.contains(n) list.contains list n {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		} list.add(n) list.add list n if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1; n % 2 == 0 n % 2 n 2 0 n /= 2 n 2 n = 3 * n + 1 n 3 * n + 1 3 * n 3 n 1 System.out.println(list.size() + 1) System.out.println System.out System System.out list.size() + 1 list.size() list.size list 1 String args[] args

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		while (!list.contains(n)) {
			
			list.add(n);
			if (n % 2 == 0) n /= 2;
			else n = 3 * n + 1;
			
		}
		
		System.out.println(list.size() + 1);
	}
}