import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  }
  public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  }
  public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  } main {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int now = s; now s List<Integer> li = new ArrayList<Integer>(); li new ArrayList<Integer>() li.add(s) li.add li s while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    } !(li.contains(fan(now))) (li.contains(fan(now))) li.contains li fan(now) fan now {
      li.add(fan(now));
      now = fan(now);
    } li.add(fan(now)) li.add li fan(now) fan now now = fan(now) now fan(now) fan now int size = li.size(); size li.size() li.size li System.out.println(size+1) System.out.println System.out System System.out size+1 size 1 String[] args args public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  } fan {
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  } if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    } a % 2 == 0 a % 2 a 2 0 {
      return a/2;
    } return a/2; a/2 a 2 {
      return 3*a+1;
    } return 3*a+1; 3*a+1 3*a 3 a 1 int a a public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  }
  public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  }
  public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int now = s;
    List<Integer> li = new ArrayList<Integer>();
    li.add(s);
    while(!(li.contains(fan(now)))){
      li.add(fan(now));
      now = fan(now);
    }
    int size = li.size();
    System.out.println(size+1);

  }
  public static int fan(int a){
    if(a % 2 == 0){
      return a/2;
    }else{
      return 3*a+1;
    }
  }
}
