#include using namespace std; using u64 = uint_least64_t; using s64 = int_least64_t; using ll = uint_least64_t; int main(){ string xs, us, ds; cin >> xs; int pos = xs.find("."); // cout << pos << endl; if (pos < 0){ cout << xs << "/1" << endl; return 0; } us = xs.substr(0, pos); // cout << "us=" << us << endl; ds = xs.substr(pos + 1, xs.length() - pos-1); // cout << "ds=" << ds << endl; string ts = us + ds; // cout << "ts=" << ts << endl; u64 tsi = atoi(ts.c_str()); if (tsi == 0){ cout << "0/1" << endl; return 0; } u64 b = pow(10, ds.length()); if (tsi % 2 == 0){ tsi /= 2; b /= 2; } if (tsi % 5 == 0){ tsi /= 5; b /= 5; } cout << tsi << "/"<< b << endl; return 0; }