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