#include <stdio.h>

int main() {
    int number;
    int count = 0;
    while ((scanf("%d", &number)) != EOF) {
        while (number != 1) {
            if (number % 2 == 0) { // 偶数
                number /= 2;
                count++;
            } else {
                number = (number * 3 + 1) / 2;
                count++;
            }
        }
        printf("%d", count);
    }
    return 0;
}