#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int toInt(char xx) { return xx - '0'; }
char toChar(int xx) { return xx + '0'; }
int n;
int ret;
int save_n;
int tmp;
void read() {
  cin >> n;
  save_n = n;
}
void init() {}
void solve() {
  for (int base = 2; base <= save_n - 1; ++base) {
    n = save_n;
    while (n > 0) {
      ret += (n % base);
      n /= base;
    }
  }
  int k = gcd(ret, save_n - 2);
  cout << (ret / k) << "/" << ((save_n - 2) / k);
}
int main() {
  read();
  init();
  solve();
}
