s = gets.to_i
count = 1
arr = [s]
while true
if s % 2 == 0
    s = s / 2
    arr << s
    mezirusi = s
elsif s % 2 != 0
    s = s * 3 + 1
    arr << s
    mezirusi = s
end
ans = arr.count(mezirusi)
if ans == 2
    puts count + 1
    break
end
count += 1
end
