import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); String s = sc.next(); long x; long y = 1; if (s.contains(".")) { x = Long.parseLong(s.substring(0, s.indexOf("."))); int length = s.length() - s.indexOf(".") - 1; for (int i = 0; i < length; i++) { x *= 10; y *= 10; } x += Long.parseLong(s.substring(s.indexOf(".") + 1, s.length())); } else { x = Long.parseLong(s); } long gcd = getGCD(x, y); System.out.println((x / gcd) + "/" + (y / gcd)); } static long getGCD(long x, long y) { if (x % y == 0) { return y; } else { return getGCD(y, x % y); } } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }