from math import gcd S = input() if S.count("."): sa, sb = S.split(".") dig = len(sb) a = int(sa) b = int(sb) x = a*10**dig + b y = 10**dig g = gcd(x, y) x //= g y //= g else: x = int(S) y = 1 print("{}/{}".format(x, y))