#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair ll gcd(ll a, ll b) { return (a % b) ? gcd(b,a%b) : b; } int main() { string x; cin >> x; reverse(x.begin(), x.end()); ll lx = 0; ll tmp = 1; bool flag = true; ll c = 1; rep(i, x.size()) { if (x[i] == '.') { flag = false; continue; } lx += tmp*(x[i]-'0'); tmp *= 10; if (flag) c *= 10; } if (flag) { cout << lx << "/" << 1 << endl; } else { ll g = gcd(lx, c); cout << lx/g << "/" << c/g << endl; } }