#include<stdio.h>
int main()
{
int n =0,flag=0;
scanf("%d",&n);
while(n!=1)
{
if(n%2==0)
n=n/2;
else
n=3*n+1;
flag++;
}
printf("%d",flag);
return 0;
}
#include<stdio.h>
int main()
{
int n =0,flag=0;
scanf("%d",&n);
while(n!=1)
{
if(n%2==0)
n=n/2;
else
n=3*n+1;
flag++;
}
printf("%d",flag);
return 0;
}