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 if "." in X: print(Fraction(multiple_ten(X, d)) / Fraction(10 ** d)) else: print(X + "/" + "1")