import sys readline=sys.stdin.readline from math import gcd as GCD X=readline().rstrip() if "." in X: i=X.index(".") a,b=int(X[:i]+X[i+1:]),10**(len(X)-(i+1)) g=GCD(a,b) a//=g b//=g else: a,b=int(X),1 print(a,"/",b,sep="")