def main(): X = open(0).read().rstrip().split('.') x = int(X[0]) if len(X) == 1: y = 1 else: y = 10 ** len(X[1]) x = x * y + int(X[1]) g = gcd(x, y) x //= g y //= g print(x, y, sep = '/') def gcd(i, j): while (r := i % j) != 0: i, j = j, r return j if __name__ == '__main__': main()