import math x = input() s = 0 check = False b = 1 for i in range(len(x)): s *= 10 if x[i] == ".": check = True b = 10**(len(x)-i-1) else: s += int(x[i]) g = math.gcd(s,b) s //= g b //= g print("{}/{}".format(s,b))