#include <stdlib.h>

int proc( int y)
{ int res; 
  int x;
  while ( 1) {
        x = random() % 13;
	res++;
        y = res % x;
  }
  return res;
}

int main(int argc, char*argv[] )
{int x;
 x = atoi( argv[1] );
 proc( x );
 return 0;
}
