input = gets.chomp.to_i
count = 1                   # 1番目から始まる
num = input

while num != 1
    # print "num",num," count",count,"\n"

    if (num % 2 == 1)       # 奇数の場合
        num = num * 3 + 1 
    else
        num = num / 2       # 偶数の場合
    end

    count += 1
end

count += 1                  # 1の次の値を出力するため
#print "答え num",num," count",count
p count