x = [str(i) for i in input().split(".")] def gcd(a,b): if b>a: a,b=b,a if a==b: return a elif a%b==0: return b else: return gcd(b,a%b) if len(x) == 1: print(str(x[0])+"/1") else: a = int(x[0]) t = x[1] b = 10**len(t) c = b*a+int(t) d = gcd(b,c) b //= d c //= d print(str(c)+"/"+str(b))