#include #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; vector factorize(int n) { vector res; for (int i = 2; i*i <= n; ++i) { if (n%i != 0) continue; res.push_back(i); while (n%i == 0) n /= i; } if (n != 1) res.push_back(n); return res; } int main() { int n; cin >> n; auto fs = factorize(n); int m = fs.size(); int m2 = 1<>i&1) d *= fs[i]; int cnt = n/d; double now = cnt*1./(n-cnt); if (__builtin_parity(s)) ans += now; else ans -= now; } printf("%.10f\n", ans); return 0; }