#include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
const int N = 1e6;
bool p[N];
int E1() {
int cnt = 0;
memset(p, 0, sizeof(p));
for (int i = 2; i < N; i++)
if (!p[i])
for (int j = i + i; j < N; j += i)
p[j] = 1, cnt++;
return cnt;
}
int E2() {
int cnt = 0;
memset(p, 0, sizeof(p));
for (int i = 2; i * i < N; i++)
if (!p[i])
for (int j = i * i; j < N; j += i)
p[j] = 1, cnt++;
return cnt;
}
int main() {
printf("%.4f\n", 1. * E1() / E2());
}
// Output: 1.3078