a=int(input()) b=0 if a in range(1,101): while a<>1: b=b+1 if a%2==0: a=a/2 else: a=a*3+1 else: print b else: print "goodbe"