#include <bits/stdc++.h>
using namespace std;
int sum;
void solve(int n, int r) {
  do {
    sum += n % r;
    n /= r;
  } while (n > 0);
}
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int A;
  while (scanf("%d", &A) != EOF) {
    sum = 0;
    for (int i = 2; i < A; ++i) solve(A, i);
    int gcdd = gcd(sum, A - 2);
    int X = sum / gcdd;
    int Y = (A - 2) / gcdd;
    printf("%d/%d\n", X, Y);
  }
  return 0;
}
