// Aizu 2131: Pi is Three
// 2017.9.22 bal4u@uu

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

#define EPS 1e-9
#define PI 3.1415926535897932384626433832795

int main(void)
{
	int k, t;
	double r;

	while (scanf("%lf", &r) && fabs(r) > EPS) {
		for (k = 1 ; ; k++) {
			t = (int)(k * PI);
			if (fabs((double)t  /k - PI) <= r) break;
			if (fabs((double)++t/k - PI) <= r) break;
		}
		printf("%d/%d\n", t, k);
    }
	return 0;
}