#include <stdio.h>
#include <stdlib.h>
int main(void){
int x,y;
while(scanf("%d",&x)!=EOF){
y=0;/*令y=0*/
while(x!=1){/*根據敘述,x==1就停了*/
if(x%2==0){/*x是偶數則x=x/2*/
x=x/2;
}else{/*x是奇數則x=x*3+1*/
x=3*x+1;
}/*進行變換就y=y+1*/
y++;
}/*輸出y*/
printf("%d\n",y);
}
return 0;
}