#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int main() { string x, t; cin >> x; int n = x.size(); int p = 0; for (int i = 0; i < n; i++) { if (x[n - i - 1] == '.') { p = i; continue; } t += x[n - i - 1]; } reverse(t.begin(), t.end()); ll b = stoll(t); ll a = 1; for (int i = 0; i < p; i++) a *= 10; ll g = gcd(a, b); cout << b / g << '/' << a / g << endl; return 0; }