from math import gcd s = input() if '.' not in s: print(f"{s}/1") exit() a, b = map(int, s.split('.')) digit = len(str(b)) 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}")