x = input() n = len(x) p = x.find('.') if p == -1: print(x + '/1') exit() c2 = c5 = n - p - 1 x = int(x.replace('.', '')) while x % 2 == 0 and c2: c2 -= 1 x //= 2 while x % 5 == 0 and c5: c5 -= 1 x //= 5 print(f'{x}/{2 ** c2 * 5 ** c5}')