#include #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--) #define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++) #define rrep2(ri,x,n) for(int ri = (int)(n-1); ri >= (int)(x); ri--) #define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++) #define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++) #define ALL(x) x.begin(), x.end() using ll = long long; using namespace std; int main() { string s; cin >> s; ll base = 1, now = 0; bool f = false; rep(i, s.size()) { if(s.at(i) == '.'){ f = true; continue; } now *= 10; now += s.at(i) - '0'; if(f == true) { base *= 10; } } if(now == 0) { cout << "0/1" << endl; return 0; } ll g = gcd(now, base); cout << now/g << "/" << base/g << endl; return 0; }