import sys from fractions import * input = sys.stdin.readline def multiple_ten(s, d): # float with error -> int without error if not "." in s: return int(s) * 10 ** d x, r = s.split(".") return int(x) * 10 ** d + int(r) * 10 ** (d - len(r)) X = input()[: -1] d = 8 res = str(Fraction(multiple_ten(X, d)) / Fraction(10 ** d)) if "." in res: print(res) else: print(res + "/1")