def x10(st, n=4): if st[0] == "-": return -x10(st[1:], n) if "." not in st: return int(st) * 10 ** n a = st.find(".") return int(st[:a]) * 10 ** n + int("0" + st[a+1:]) * 10 ** (n - len(st) + a + 1) def gcd(a, b): while b: a, b = b, a % b return a a = x10(input(), 8) b = 10 ** 8 g = gcd(a, b) print(str(a // g) + "/" + str(b // g))