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

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s=sc.nextInt(),count=1;
		List<Integer> ary = new ArrayList<Integer>();
		ary.add(s);
		while(true) {
			count++;
			if(s%2==0) s/=2;
			else s = 3*s+1;
			if(ary.indexOf(s) != -1)break;
			ary.add(s);
		}
		System.out.println(count);
	}
}
