import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  }
} 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();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  } main {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int m = 1; m 1 for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	} int i = 0; int i = 0; i 0 i < 10000 i 10000 i++ i++ i {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	} {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	} if(s == 4 || s == 2 || s == 1) {
        break;
	  } s == 4 || s == 2 || s == 1 s == 4 || s == 2 || s == 1 s == 4 s 4 s == 2 s 2 s == 1 s 1 {
        break;
	  } break; if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  } s % 2 == 0 s % 2 s 2 0 {
        s = s / 2;
        m = m + 1;
	  } s = s / 2 s s / 2 s 2 m = m + 1 m m + 1 m 1 {
        s = (s * 3) + 1;
		m = m + 1;
	  } s = (s * 3) + 1 s (s * 3) + 1 (s * 3) s 3 1 m = m + 1 m m + 1 m 1 m = m + 3 m m + 3 m 3 System.out.println(m) System.out.println System.out System System.out m String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int m = 1;
    for (int i = 0;i < 10000;i++) {
      if(s == 4 || s == 2 || s == 1) {
        break;
	  }
      if(s % 2 == 0) {
        s = s / 2;
        m = m + 1;
	  }
      else {
        s = (s * 3) + 1;
		m = m + 1;
	  }
	}
    m = m + 3;
	System.out.println(m);
  }
}
