---------------------------------------------------------
#include<stdio.h>
int main() {
int N;
int count = 0;
scanf_s("%d", &N);
while (1) {
if (N == 1) break;
else {
if (N % 2 == 0)
N /= 2;
else if(N%2==1)
N = (3 * N + 1)/ 2;
count++;
}
}
printf("%d", count);
return 0;
}