#include using namespace std; typedef long long ll; ll gcd(ll n, ll m){ if(n % m == 0) return m; return gcd(m, n % m); } int main() { string x; cin >> x; int n = x.size(); bool f = false; ll p = 0, q = 1; for(int i = 0; i < n; i++){ if(x[i] == '.'){ f = true; continue; } p = p * 10 + x[i] - '0'; if(f) q *= 10; } ll g = gcd(p, q); cout << p / g << "/" << q / g << endl; }