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

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    sc.close();
    List<Integer> ls = new ArrayList<>();
    ls.add(s);
    int c = s;
    for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    }
  }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    sc.close();
    List<Integer> ls = new ArrayList<>();
    ls.add(s);
    int c = s;
    for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    sc.close();
    List<Integer> ls = new ArrayList<>();
    ls.add(s);
    int c = s;
    for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    sc.close();
    List<Integer> ls = new ArrayList<>();
    ls.add(s);
    int c = s;
    for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc sc.close() sc.close sc List<Integer> ls = new ArrayList<>(); ls new ArrayList<>() ls.add(s) ls.add ls s int c = s; c s for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    } int i = 1; int i = 1; i 1 i < 1000000 i 1000000 i++ i++ i {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    } {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    } if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      } c % 2 == 0 c % 2 c 2 0 {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } int f1 = c/2; f1 c/2 c 2 if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        } ls.contains(f1) ls.contains ls f1 {
          System.out.println(ls.size()+1);
          return;
        } System.out.println(ls.size()+1) System.out.println System.out System System.out ls.size()+1 ls.size() ls.size ls 1 return; ls.add(f1) ls.add ls f1 c = f1 c f1 {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      } int f2 = 3 * c + 1; f2 3 * c + 1 3 * c 3 c 1 if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        } ls.contains(f2) ls.contains ls f2 {
          System.out.println(ls.size()+1);
          return;
        } System.out.println(ls.size()+1) System.out.println System.out System System.out ls.size()+1 ls.size() ls.size ls 1 return; ls.add(f2) ls.add ls f2 c = f2 c f2 String[] args args
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    sc.close();
    List<Integer> ls = new ArrayList<>();
    ls.add(s);
    int c = s;
    for (int i = 1; i < 1000000; i++) {
      if (c % 2 == 0) {
        int f1 = c/2;
        if (ls.contains(f1)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f1);
        c = f1;
      } else {
        int f2 = 3 * c + 1;
        if (ls.contains(f2)) {
          System.out.println(ls.size()+1);
          return;
        }
        ls.add(f2);
        c = f2;
      }
    }
  }
}
