# 1464 Number Conversion from sys import stdin def dividePossibleTimes(x,n): t=0 while True: x=x/n if not x.is_integer(): break t+=1 return t x=float(stdin.readline()) decpart=x-int(x) integer=x-decpart if decpart==0: print('{}/1'.format(int(integer))) exit() denominator=10**(len(format(decpart))-2) decpart=format(decpart)[2:] dp=int(decpart) min2=min(dividePossibleTimes(dp,2),dividePossibleTimes(int(denominator),2)) min5=min(dividePossibleTimes(dp,5),dividePossibleTimes(int(denominator),5)) denominator=denominator/(2**min2) dp=dp/(2**min2) denominator=denominator/(5**min5) dp=dp/(5**min5) print('{0}/{1}'.format(int(integer*denominator+dp),int(denominator)))