from math import gcd X = input().split(".") if len(X) == 1: print(str(X[0])+"/1") exit() a = int(X[1]) b = 10 ** len(X[1]) g = gcd(a,b) a //= g b //= g a += int(X[0]) * b print(str(a)+"/"+str(b))