#!usr/bin/python # -*- coding:utf-8 -*- k=0 s=input() while (s!=1): if (s%2==0): s=s/2 else: s=3*s+1 k=k+1 print k