#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  int x = a, sum = 0, avg = 0, c = 0;
  for (int i = 2; i < a; i++) {
    x = a;
    sum = 0;
    while (x != 0) {
      sum += (x % i);
      x /= i;
    }
    avg += sum;
    c++;
  }
  for (int i = 2; i < sqrt(avg) + 1; i++) {
    if (avg % i == 0 && c % i == 0) {
      avg /= i;
      c /= i;
      i = 1;
    }
  }
  cout << avg << "/" << c;
}
