s = gets.to_i
previous_a = s
as = [previous_a]
current_a = nil
i = 1
while as.count(current_a) < 2
    previous_a.even? ? current_a = previous_a / 2 : current_a = previous_a * 3 + 1
    previous_a = current_a
    as.push(current_a)
    i += 1
end
p i