using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var s = ReadLine(); var ch = long.Parse(s.Replace(".", "")); var pa = 1L; if (s.IndexOf('.') >= 0) for (var i = s.IndexOf('.') + 1; i < s.Length; ++i) pa *= 10; var gcd = GCD(ch, pa); WriteLine($"{ch / gcd}/{pa / gcd}"); } static long GCD(long a, long b) { if (b == 0) return a; if (a < b) return GCD(b, a); if (a % b == 0) return b; return GCD(b, a % b); } }