#include using namespace std; long long gcd(long long a,long long b) { if(a % b == 0) { return b; } else { return gcd(b,a % b); } } int main() { string X; cin >> X; bool flag = false; string T = ""; long long tmp = 1; for(int i = 0; i < X.size(); i++) { if(X[i] == '.') { flag = true; } else { T += X[i]; if(flag) { tmp *= 10; } } } long long tmp2 = stoll(T); long long g = gcd(tmp2,tmp); tmp2 /= g; tmp /= g; cout << tmp2 << '/' << tmp << endl; }