#!/usr/bin/python #_*_ coding:utf-8 _*_ c=0 n = input () while ( n <> 1): if n%2==0: n=n/2 c+=1 else: n = n * 3 + 1 c+=1 print c