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

#define PI 3.1415926535897932384626433832795028841

int main(void) {
	double R;
	while(scanf("%lf",&R)==1 && R>0.0) {
		int left,right,mid;
		int bunbo,bunsi1,bunsi2;
		double g1,g2;
		left=0;right=100000000;
		while(left<=right) {
			int nbunsi;
			double a,b;
			mid=(left+right)/2;
			nbunsi=(int)(PI*mid);
			a=(double)nbunsi/mid;
			b=(double)(nbunsi+1)/mid;
			if(fabs(a-PI)<=R || fabs(b-PI)<=R)right=mid-1; else left=mid+1;
		}
		bunbo=right+1;
		bunsi1=(int)(PI*bunbo);
		bunsi2=bunsi1+1;
		g1=fabs((double)bunsi1/bunbo-PI);
		g2=fabs((double)bunsi2/bunbo-PI);
		printf("%d/%d\n",g1<=g2?bunsi1:bunsi2,bunbo);
	}
	return 0;
}