#include<cstdio> int main() { int n; int count = 0; while (scanf("%d\n", &n) != EOF) { while (true) { if (n == 1) { break; } else { if (n % 2 == 0) { n = n / 2; count++; } else { n = (n * 3 + 1) / 2; count++; } } } printf("%d\n", count); } }