#include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> #include <unordered_set> #include <random> #include <cassert> #include <fstream> #include <utility> #include <functional> #include <time.h> #include <stack> #include <array> #include <list> #include <atcoder/all> #define popcount __builtin_popcount using namespace std; using namespace atcoder; typedef long long ll; typedef pair<int, int> P; int main() { string x; cin>>x; ll s=0; ll p=0; for(int i=0; i<x.size(); i++){ if(x[i]=='.'){ p=1; continue; } p*=10; s*=10; s+=x[i]-'0'; } if(p==0) p=1; ll g=gcd(s, p); s/=g, p/=g; cout<<s<<"/"<<p<<endl; return 0; }