from fractions import Fraction x = input() if '.' in x: t = x.index('.') if float(x).is_integer(): print(x[:t] + '/1') elif float(x).is_integer(): print(x + '/1') else: ans = Fraction(x) print(ans)