OIG VIII - ulamki

// https://szkopul.edu.pl/problemset/problem/b9z7CefMu8uwRXaCBm9FiUyO/site/?key=statement
// OIG VIII (2 etap)

#include <iostream>
#include <math.h>
#include <string>

int gcd(int a, int b) {
    if (b == 0)
        return a;
    else
        return gcd(b, a % b);
}

int main() {
    std::ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    std::cout.tie(0);

    std::string s;
    std::cin >> s;

    int n = s.size();

    int a = std::stoi(s);

    int pow_10 = pow(10, n);

    pow_10--;

    int nwd = gcd(a, pow_10);

    std::cout << a / nwd << "/" << pow_10 / nwd << '\n';

    return 0;
}