a = []
a[0] = gets.to_i
i = 1
while true
  a[i] = a[i - 1] / 2 if a[i - 1].even?
  a[i] = 3 * a[i - 1] + 1 if a[i - 1].odd?
  
  if a.uniq.length != a.length
    puts i + 1
    exit
  end
  i += 1
end