import Foundation

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

var ai = s
for_m: for m in 1 ... 1000000 {
    if ai % 2 == 0 {
        ai = ai / 2
    } else {
        ai = 3 * ai + 1
    }
    a.append(ai)
    
    for n in 0 ..< m {
        if a[n] == a[m] {
            print(m+1)
            break for_m
        }
    }
}