#include <iostream>
#include <cmath>
using namespace std;

int main() {
    double r;

    while(cin>>r) {
        if(r == 0.0) break;
        for(int i=1; i<=10000000; ++i) {
            int tmp = i*M_PI;
            if(fabs((double)tmp/i - M_PI) <= r) {
                cout<<tmp<<"/"<<i<<endl;
                break;
            }
            if(fabs((double)(tmp+1)/i - M_PI) <= r) {
                cout<<tmp+1<<"/"<<i<<endl;
                break;
            }
        }
    }
}