a=[]
a[0]=gets.to_i
1000000.times{|i|
    if a[i]%2==0
        a[i+1]=a[i]/2
        else
        a[i+1]=a[i]*3+1
        end
    (i+1).times{|k|
        if a[k]==a[i+1]
            puts (i+2)
            exit
            end
    }
}