import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int s = Integer.parseInt(in.readLine()); s Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int[] ary = new int[1000000]; ary new int[1000000] 1000000 boolean roopFlg = false; roopFlg false for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    } int i=0; int i=0; i 0 i++ i++ i {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    } {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    } ary[i] = s ary[i] ary i s if(s%2==0)
        s=s/2;
      else
        s=3*s+1; s%2==0 s%2 s 2 0 s=s/2 s s/2 s 2 s=3*s+1 s 3*s+1 3*s 3 s 1 for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      } int j=0; int j=0; j 0 j<i j i j++ j++ j {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      } {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      } if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        } ary[i]==ary[j] ary[i] ary i ary[j] ary j {
          System.out.println(i+1);
          roopFlg = true;
          break;
        } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 roopFlg = true roopFlg true break; if(roopFlg == true)
        break; roopFlg == true roopFlg true break; String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(in.readLine());
    int[] ary = new int[1000000];
    boolean roopFlg = false;
    for(int i=0; ; i++) {
      ary[i] = s;
      if(s%2==0)
        s=s/2;
      else
        s=3*s+1;
      for(int j=0; j<i; j++) {
        if(ary[i]==ary[j]) {
          System.out.println(i+1);
          roopFlg = true;
          break;
        }
      }
      if(roopFlg == true)
        break;
    }
  }
}