#include <stdio.h>




/* This is the C one */
unsigned int collatz_in_c(unsigned int n) {
   unsigned int count = 0 ;
   while (n != 1) {
      if (n & 1) {
         n = 3 * n + 1 ;
      } else {
         n = n / 2 ;
      }
      ++count ;
   }
   return count ;
}

/* This is the one you will write */
unsigned int collatz(unsigned int n) {
    /* Your stuff goes here */
   return count ;
}

int main(int argc, char *argv[]) {
  printf("collatz(1073741824) is %d -- expecting %d\n",
	 collatz(1073741824), collatz_in_c(1073741824)) ;
  printf("collatz(1000000000) is %d -- expecting %d\n",
	 collatz(1000000000), collatz_in_c(1000000000)) ;
}
