/*
  AOJ 2131
  Title:Pi is Three
  @kankichi573
*/
#include <stdio.h>
#include <math.h>
#include <float.h>

// #define max(x,y) (((x)>(y))?(x):(y))
// #define min(x,y) (((x)<(y))?(x):(y))

main()
{
  double pai=atan(1)*4;
  double x,d1,d2;
  int m,n;

  while(scanf("%lf",&x) && (x != 0.0))
    {
      if(x >= pai-3)
	{
	  printf("3/1\n");
	  continue;
	}
      for(m=2;m<10000000;m++)
	{
	  n = (double)m*pai;
	  d1=pai-(double)n/(double)m;
	  d2=((double)n+1.0)/(double)m-pai;

	  if(fabs(d2)<x)
	    {
	      printf("%d/%d\n",n+1,m);
	      break;
	    }
	  if(fabs(d1)<x)
	    {
	      printf("%d/%d\n",n,m);
	      break;
	    }
	}
    }
  return(0);
}