import std.stdio, std.range, std.conv, std.string;
import std.algorithm.comparison, std.algorithm.iteration, std.algorithm.mutation, std.algorithm.searching, std.algorithm.setops, std.algorithm.sorting;

void main()
{
    long s = readln().strip.to!(long);
    long[] list;
    list ~= s;
    while(1)
    {
        auto p = list[$-1];
        auto n = p % 2 == 0 ? p/2 : p*3+1;
        foreach(e; list) {
            if(e==n){
                writeln(1+list.length);
                return;
            }
        }
        list ~= n;
    }
}
