#!/user/bin/python # -*- coding: UTF-8 -*- a=int(input()) n=0 while a!=1: if a % 2 == 0: a=a/2 n=n+1 else: a=a*3+1 n=n+1 print n