#include <bits/stdc++.h>
using namespace std;
vector<int> dec2base(int n, int base) {
  int n_base = 0, coef = 1;
  vector<int> auxa;
  while (n != 0) {
    n_base += coef * (n % base);
    coef *= 10;
    auxa.push_back(n % base);
    n /= base;
  }
  return auxa;
}
int mcd(int num, int den) {
  int u = abs(num);
  int v = abs(den);
  if (v == 0) {
    return u;
  }
  int r;
  while (v != 0) {
    r = u % v;
    u = v;
    v = r;
  }
  return u;
}
pair<int, int> simplificar(int num, int den) {
  int dividir = mcd(num, den);
  num /= dividir;
  den /= dividir;
  return make_pair(num, den);
}
int main() {
  int val;
  cin >> val;
  int solu = 0;
  for (int i = 2; i < val; i++) {
    vector<int> valor = dec2base(val, i);
    for (int j = 0; j < valor.size(); j++) {
      solu += valor[j];
    }
  }
  pair<int, int> frac = simplificar(solu, val - 2);
  cout << frac.first << '/' << frac.second << '\n';
}
