Module P1
Sub main()

    Dim RD As String
    Dim SD() As String
    
    Dim a() As Long
    Dim nowI As Long
    Dim CheckI As Long
    Dim CheckNum As Long
    Dim haken As Boolean
    
    ReDim Preserve a(0)
    RD = Console.Readline()
    a(0) = RD
    nowI = 0
    haken = False
    Do While nowI < 1000000
        ReDim Preserve a(nowI + 1)
        If a(nowI) Mod 2 = 0 Then
            a(nowI + 1) = a(nowI) / 2
        Else
            a(nowI + 1) = a(nowI) * 3 + 1
        End If
        CheckNum = a(nowI + 1)
        For CheckI = 0 To UBound(a) - 1
            If a(CheckI) = CheckNum Then
                Exit Do
            End If
        Next
        
        nowI = nowI + 1
    Loop
    
    Console.Writeline (nowI + 2)

End Sub

end Module
