#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int main() { double x; cin >> x; string s = to_string(x); int pos = s.find('.'); int d = 0; if (pos == -1) d = 0; else d = s.size() - pos - 1; ll a = pow(10, d); double y = x * pow(10, d); ll b = ll(y); ll g = gcd(a, b); cout << b / g << '/' << a / g << endl; return 0; }