import math
N = str(input())
if "." not in N:
    ans = N+"/1"
    print(ans)
else:
    a, b = N.split('.')
    a = int(a); bl = len(b)
    b = int(b)
    gcd = math.gcd(b,pow(10,bl))
    bunshi = b // gcd
    bunbo = pow(10,bl) // gcd
    bunshi += bunbo * a
    ans = str(bunshi) + "/" + str(bunbo)
    print(ans)