import math x = input() num = 0 cnm = -1 for i in range(len(x)): if x[i] == ".": cnm = len(x)-i-1 else: num = num*10+int(x[i]) #print(num) if cnm == -1: print(num,"/",1,sep="") exit() else: shi,bo = num,10**cnm gd = math.gcd(shi,bo) #print(gd) print(shi//gd,"/",bo//gd,sep="") #print(cnm) #print(10**2)