#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; double w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-10; int main() { int K; cin >> K; int x = 0; for (int t = 0; t < 1000000; t++) { int sum = 0; int i; for (i = 1; ; i++) { sum += rand() % 6 + 1; if (sum >= K) break; } x += i; } printf("%.10f\n", x / 1000000.0); }