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