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