#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=144499999999994; ll mod=998244353; ll gcd(ll a, ll b) { a = abs(a); b = abs(b); if (a < b)swap(a, b); while (b) { ll r=a%b; a=b; b=r; } return a; } int main(){ string s; cin >> s; bool ok=true; for (ll i = 0; i < s.size(); i++) { if (s[i]=='.') { ok=false; break; } } if (ok) { cout << s << "/1" << endl; return 0; } ll x=s.size(); ll now=1; string t; bool o=true; ll zz=0; for (ll i = 0; i < s.size(); i++) { if (s[i]=='.') { o=false; continue; }else{ t.push_back(s[i]); } if (!o) { zz+=1; } } for (ll i = 0; i < zz; i++) { now*=10; } ll y=stoll(t); ll z=gcd(y,now); y/=z; now/=z; cout << y << '/' << now << endl; }