from math import gcd x = input() n = len(x) dot = n-1 for i in range(n): if x[i] == '.': dot = i s = int(x.replace('.', '')) b = 10 ** (n - 1 - dot) g = gcd(s, b) s //= g b //= g print(str(s)+'/'+str(b))