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