import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  }

  public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  }

  class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  }

  public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  }

  class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  } main {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int start = sc.nextInt(); start sc.nextInt() sc.nextInt sc Main abc116B = new Main(); abc116B new Main() System.out.println(abc116B.solve(start)) System.out.println System.out System System.out abc116B.solve(start) abc116B.solve abc116B start String[] args args public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  } solve {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  } ABC116BSolve abc116BSolve = new ABC116BSolve(); abc116BSolve new ABC116BSolve() return abc116BSolve.search(start); abc116BSolve.search(start) abc116BSolve.search abc116BSolve start int start start class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  } ABC116BSolve public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    } search {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    } boolean[] history = new boolean[1000000]; history new boolean[1000000] 1000000 int current = start; current start int i = 1; i 1 while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      } true {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      } if (history[current]) return i; history[current] history current return i; i history[current] = true history[current] history current true if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        } current % 2 == 1 current % 2 current 2 1 {
          current = 3 * current + 1;
        } current = 3 * current + 1 current 3 * current + 1 3 * current 3 current 1 {
          current /= 2;
        } current /= 2 current 2 i++ i int start start public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  }

  public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  }

  class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  }

  public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  }

  class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int start = sc.nextInt();
    Main abc116B = new Main();
    System.out.println(abc116B.solve(start));
  }

  public int solve(int start) {
    ABC116BSolve abc116BSolve = new ABC116BSolve();
    return abc116BSolve.search(start);
  }

  class ABC116BSolve {

    public int search(int start) {
      boolean[] history = new boolean[1000000];
      int current = start;
      int i = 1;
      while (true) {
        if (history[current]) return i;
        history[current] = true;
        if (current % 2 == 1) {
          current = 3 * current + 1;
        } else {
          current /= 2;
        }
        i++;
      }
    }
  }
}
