#include<iostream>
using namespace std;

int collatz(int);
int count(int);

int main(void){
  int num;

  while(1){

    cin >> num;
    if( num == 0 ) break;

    cout << collatz(num) << endl;

  }

  return 0;
}

int collatz(int num){
  int cnt = 0;
  
  while( num != 1 ){
    
    switch(num%2){
      
    case 0:
      num /= 2;
      break;
      
    case 1:
      num = num*3 + 1;
      break;      
    }
    cnt++;
  }  
  return cnt;
}