import java.util.Scanner;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  } main {
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int endPoint = 10000; endPoint 10000 int[] ary = new int[endPoint]; ary new int[endPoint] endPoint int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc ary[0] = s ary[0] ary 0 s for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    } int i=1; int i=1; i 1 i<endPoint i endPoint i++ i++ i {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    } {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    } if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	} ary[i-1] %2 ==0 ary[i-1] %2 ary[i-1] ary i-1 i 1 2 0 {
    		ary[i] = ary[i-1]/2;
    	} ary[i] = ary[i-1]/2 ary[i] ary i ary[i-1]/2 ary[i-1] ary i-1 i 1 2 {
    		ary[i] = ary[i-1]*3+1;
    	} ary[i] = ary[i-1]*3+1 ary[i] ary i ary[i-1]*3+1 ary[i-1]*3 ary[i-1] ary i-1 i 1 3 1 int ans=0; ans 0 System.out.println(ans+1) System.out.println System.out System System.out ans+1 ans 1 String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  }
} Main
import java.util.Scanner;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int endPoint = 10000;
    int[] ary = new int[endPoint];
    int s = sc.nextInt();
    ary[0] = s;
    for(int i=1; i<endPoint; i++) {
    	if(ary[i-1] %2 ==0) {
    		ary[i] = ary[i-1]/2;
    	}
    	else {
    		ary[i] = ary[i-1]*3+1;
    	}
    }
    int ans=0;
    for1:
    for(int m=2; m<endPoint; m++) {
        for(int n=0; n<m-1; n++) {
        	if(ary[n]==ary[m]) {
        		ans = m; break for1;
        	}
        }
    }
    System.out.println(ans+1);
  }
}