import Foundation

var s = Int(readLine()!)!
var a: [Int] = []

while a.indexOf(s) == nil {
    a.append(s)
    if s % 2 == 0 {
        s /= 2
    } else {
        s = 3 * s + 1
    }
}
print(a.count + 1)