#include <stdio.h>

int main() {
    int n, cnt = 0;
    scanf("%d", &n);
    while (n != 1) {
        if (n % 2 == 0) {
            n /= 2;
            cnt++;
        }

        else {
            n = (n * 3 + 1);
            cnt++;
        }
    }

    if (n == 1) {
        printf("%d\n", cnt);
    }

}