#include <bits/stdc++.h>
using namespace std;
int number_in_base(int x, int base) {
  int re = 0;
  while (x) {
    re += x % base;
    x /= base;
  }
  return re;
}
int gcd(int x, int y) {
  if (!x || !y) return x > y ? x : y;
  for (int t; t = x % y; x = y, y = t)
    ;
  return y;
}
int main() {
  int n, i, ans;
  while (cin >> n) {
    for (ans = 0, i = 2; i < n; ++i) {
      ans += number_in_base(n, i);
    }
    int tmp = gcd(ans, n - 2);
    cout << ans / tmp << "/" << (n - 2) / tmp << endl;
  }
}
