1 #include<stdio.h> 2 3 int main() 4 { 5 int n; 6 int step = 0; 7 scanf("%d", &n); 8 while( 1 != n ) 9 { 10 if( (n%2) == 0 ) 11 { 12 n = n / 2; 13 ++step; 14 } 15 else 16 { 17 n = 3 * n + 1; 18 n = n / 2; 19 ++step; 20 } 21 } 22 printf("%d\n", step); 23 return 0; 24 }