def factorization(n): retlist = [] tmp = n for i in range(2, int(-(-n**0.5//1))+1): if tmp % i == 0: cnt = 0 while tmp % i == 0: cnt += 1 tmp //= i retlist.append([i, cnt]) if tmp != 1: retlist.append([tmp, 1]) if retlist == []: retlist.append([n, 1]) return retlist s = input() a = "" b = "" # print(s.find(".")) if s.find(".") != -1: a, b = s.split(".") else: print(s+"/1") exit(0) d = len(b) ch = "" f = False for bb in b: if bb != "0": f = True if f: ch += bb if ch == "": ch = 0 else: ch = int(ch) ch += int(a)*(10**d) dch = factorization(ch) dmo = factorization(10**d) div = [] for num_ch, val_ch in dch: for num_mo, val_mo in dmo: if num_ch == num_mo: div.append((num_ch, min(val_ch, val_mo))) mo = 10**d # ch = int(ch)+int(a)*(10**d) for dn, dv in div: mo //= dn**dv ch //= dn**dv print(str(ch)+"/"+str(mo))