x=int(raw_input()) count=0 while x!=1: if x%2==0: x=x*0.5 count+=1 elif x%2==1: x=x*3+1 count+=1 print count