import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  }

  public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 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();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  }

  public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  } main {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  } 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 int[] v = new int[1000000]; v new int[1000000] 1000000 int[] a = new int[1000000]; a new int[1000000] 1000000 for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    } int i = 1; int i = 1; i 1 i < 1000000 i 1000000 i++ i++ i {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    } {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    } if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      } i == 1 i 1 {
        v[s] = i;
        a[i] = s;
      } v[s] = i v[s] v s i a[i] = s a[i] a i s {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      } int v_ = func(a[i-1]); v_ func(a[i-1]) func a[i-1] a i-1 i 1 if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        } v[v_] != 0 v[v_] v v_ 0 {
          System.out.println(i);
          break;
        } System.out.println(i) System.out.println System.out System System.out i break; {
          v[v_] = i;
          a[i] = v_;
        } v[v_] = i v[v_] v v_ i a[i] = v_ a[i] a i v_ String[] args args public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  } func {

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  } if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    } n % 2 == 0 n % 2 n 2 0 {
      return n / 2;
    } return n / 2; n / 2 n 2 {
      return 3 * n + 1;
    } return 3 * n + 1; 3 * n + 1 3 * n 3 n 1 int n n public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  }

  public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  }

  public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  }

} Main
import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int s = sc.nextInt();

    sc.close();

    int[] v = new int[1000000];
    int[] a = new int[1000000];

    for (int i = 1; i < 1000000; i++) {
      if (i == 1) {
        v[s] = i;
        a[i] = s;
      } else {
        int v_ = func(a[i-1]);
        if (v[v_] != 0) {
          System.out.println(i);
          break;
        } else {
          v[v_] = i;
          a[i] = v_;
        }
      }
    }

  }

  public static int func(int n){

    if (n % 2 == 0) {
      return n / 2;
    } else {
      return 3 * n + 1;
    }
  }

}