#include <stdio.h>

int main() {
    int a = 0;
    
    scanf("%d",&a);
    int flag = 0;
    while (a != 1)
    {
        if (a%2 == 0)
        {
            a = a / 2;
        }
        else 
        {
            a = a * 3 +1;    
        }

        flag++;
    }

    printf("%d",flag);
    return 0;
}