let s: Int = Int(readLine()!)!

var res: Int = 1
var a: Int = s
var new: Int = -1
var seq: [Int] = [a]

while true {
    res += 1
    if a%2==0 {
        new = a / 2
    } else {
        new = 3 * a + 1
    }
    if seq.contains(new) {
        break
    } else {
        seq.append(new)
        a = new
    }
}
print(res)  // (๑•ૅㅁ•๑)