import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int A[] = new int[1000001];
    for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int A[] = new int[1000001];
    for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int A[] = new int[1000001];
    for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int A[] = new int[1000001];
    for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int A[] = new int[1000001]; A new int[1000001] 1000001 for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    } int i=1; int i=1; i 1 i++ i++ i {
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    } {
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    } if(A[s] != 0){
        System.out.println(i);
        return;
      } A[s] != 0 A[s] A s 0 {
        System.out.println(i);
        return;
      } System.out.println(i) System.out.println System.out System System.out i return; A[s] = i A[s] A s i if(s%2==0) s/=2;
      else s=s*3+1; s%2==0 s%2 s 2 0 s/=2 s 2 s=s*3+1 s s*3+1 s*3 s 3 1 String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int A[] = new int[1000001];
    for(int i=1; ; i++){
      if(A[s] != 0){
        System.out.println(i);
        return;
      }
      A[s] = i;
      if(s%2==0) s/=2;
      else s=s*3+1;
    }
  }
}