#include<iostream>
#include<cmath>
using namespace std;
int main()
{
  double R;
  int numerator,denominator;
  while(cin>>R,R){
    for(denominator=1; denominator<100000; denominator++){
      numerator = (int)(denominator*M_PI);
      if(fabs((double)numerator/denominator - M_PI) <= R)break;
      if(fabs((double)(numerator+1.0)/denominator - M_PI) <= R){
	numerator++;
	break;
      }
    }
    cout<<numerator<<"/"<<denominator<<endl;
  }
}