from math import gcd X = input() if "." not in X: print(X + "/1") exit() a, b = X.split(".") B = 10 ** len(b) S = int(a + b) g = gcd(S, B) S //= g B //= g print(str(S) + "/" + str(B))