include<stdio.h>

main()
{int n,m;
scanf("%d",&n);
for(m=0;n!=1;m++)
{if(n%2==0)n/=2;
else
n=3*n+1;}
printf("%d",m);}