#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void main (void) {
  long count,cyc;
  long p1;
  p1=0; count=0; cyc=0;
  double x,y,t;
  while (1) {
    x = -log(drand48());
    y = -log(drand48());
/*
    x = drand48();
    y = drand48();
*/
    if (x>y) {t=x;x=y;y=t;}
    if (y>3*x) p1++;
    count++;
    cyc++;
//    printf("%3d %3d %f %f\n",count,p1,x,y); 
    if (cyc==500) {
      cyc=0;
      cout << p1*1.0/count << "\n";
    }
  }
}

