from math import gcd S = input() if "." not in S: print(f"{S}/1") exit() x, y = S.split(".") l = len(y) d = 10 ** l x = int(x) * d + int(y) g = gcd(x, d) x //= g d //= g print(f"{x}/{d}")