from fractions import * N=input() if (not('.' in N)) or (set(N[N.index('.')+1:])==set('0')): print(int(float(N)),1,sep='/') else: print(Fraction(N))