#include using namespace std; #define int long long //最大公約数 long long GCD(long long a, long long b){ if (a%b == 0){ return(b); } else{ return(GCD(b, a%b)); } } signed main(){ string s;cin>>s; string t=""; int bunbo=1; bool bo=false; for(char c:s){ if(c!='.'){ t+=c; } if(c=='.'){ bo=true; } else if(bo){ bunbo*=10; } } int d=stoll(t); if(d==0){ puts("0/1"); return 0; } int e=GCD(bunbo,d); cout<