def gcd(*numbers: int) -> int: if len(numbers) == 1: return numbers[0] if len(numbers) == 2: a, b = numbers if a < b: a, b = b, a while True: if a % b == 0: return b a, b = b, a % b first_gcd = gcd(*numbers[:2]) return gcd(first_gcd, *numbers[2:]) def main(): X = float(input()) if X == 0: print("0/1") return X_parent = int(1e8) X_child = int(X*X_parent) gcd_num = gcd(X_child, X_parent) X_child //= gcd_num X_parent //= gcd_num print(f"{X_child}/{X_parent}") if __name__ == "__main__": main()