from math import gcd s = input() if '.' not in s: print(f"{s}/1") exit() for i in range(len(s)): if s[i] == '.': idx = i break digit = len(s) - idx - 1 a, b = map(int, s.split('.')) a = a * pow(10, digit) + b b = pow(10, digit) gcd_ab = gcd(a, b) a //= gcd_ab b //= gcd_ab print(f"{a}/{b}")