#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; inline ll pow10(ll a) { ll res = 1; while (a--) res *= 10; return res; } int main() { cin.tie(nullptr)->sync_with_stdio(false); string s; cin >> s; if (s.find('.') == string::npos) { cout << s << "/1" << '\n'; return 0; } int pos = s.find('.'); string a = s.substr(0, pos); string b = s.substr(pos + 1); ll x = stoll(a) * pow10(b.size()) + stoll(b); ll y = pow10(b.size()); ll g = gcd(x, y); x /= g, y /= g; cout << x << '/' << y << '\n'; return 0; }