#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { string x; cin >> x; int n = x.length(); int check = -1; ll num1 = 0, num2 = 0; for(int i = 0; i < n; i++) { if(x[i] == '.') { check = i + 1; break; } num1 *= 10; num1 += (ll)(x[i] - '0'); } if(check != -1) { int cnt = 0; for(int i = check; i < n; i++) { num2 *= 10; num2 += (ll)(x[i] - '0'); cnt++; } while(cnt < 8) { num2 *= 10; cnt++; } } ll num3 = 100000000; if(num2 != 0) { ll g = gcd(num2, num3); num2 /= g, num3 /= g; } else { num3 = 1; } num2 += num1 * num3; cout << num2 << "/" << num3 << endl; return 0; }