import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int s = scanner.nextInt();
    if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    }
    int cnt = 0;
    while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    }
    System.out.println(cnt + 2);

  }

} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int s = scanner.nextInt();
    if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    }
    int cnt = 0;
    while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    }
    System.out.println(cnt + 2);

  }

} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int s = scanner.nextInt();
    if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    }
    int cnt = 0;
    while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    }
    System.out.println(cnt + 2);

  } main {
    Scanner scanner = new Scanner(System.in);
    int s = scanner.nextInt();
    if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    }
    int cnt = 0;
    while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    }
    System.out.println(cnt + 2);

  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int s = scanner.nextInt(); s scanner.nextInt() scanner.nextInt scanner if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    } s == 1 || s == 2 s == 1 s 1 s == 2 s 2 {
      System.out.println(4);
      return;
    } System.out.println(4) System.out.println System.out System System.out 4 return; int cnt = 0; cnt 0 while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    } s != 1 s 1 {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    } if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      } s % 2 == 0 s % 2 s 2 0 {
        s /= 2;
      } s /= 2 s 2 {
        s = s * 3 + 1;
      } s = s * 3 + 1 s s * 3 + 1 s * 3 s 3 1 cnt++ cnt System.out.println(cnt + 2) System.out.println System.out System System.out cnt + 2 cnt 2 String[] args args
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int s = scanner.nextInt();
    if (s == 1 || s == 2) {
      System.out.println(4);
      return;
    }
    int cnt = 0;
    while (s != 1) {
      if (s % 2 == 0) {
        s /= 2;
      } else {
        s = s * 3 + 1;
      }
      cnt++;
    }
    System.out.println(cnt + 2);

  }

}
