#include long long int gcd(long long int a, long long int b) { if (a == 0) return b; if (b == 0) return a; long long int r = a % b; while (r > 0) { a = b; b = r; r = a % b; } return b; } int main() { char x[32]; scanf("%s", x); long long int s, b, i, f; s = 0; b = 1; f = 0; for (i = 0; x[i] != '\0'; i++) { if (x[i] == '.') f++; else { s = 10 * s + x[i] - '0'; if (f > 0) b *= 10; } } printf("%lld/%lld\n", s / gcd(s, b), b / gcd(s, b)); return 0; }