#include <iostream>
using namespace std;
int func(int n){
if(n%2==0)
return n/2;
else
return (3*n+1)/2;
}
int main(){
int n;
while(cin>>n){
int iter=0;
while(n!=1){
n=func(n);
iter++;
}
cout<<iter<<endl;
}
}