#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } int main() { int N; while (~scanf("%d", &N)) { vector> dp(N+1); dp[0][0] = 1; rep(i, N) rep(j,7) { double x = dp[i][j]; if (x < 1e-99) continue; double p = j * 1. / 6; dp[i + 1][j] += x*p; if(j<6)dp[i + 1][j+1] += x*(1-p); } auto ans = dp[N][6]; printf("%.10f\n", ans); } return 0; }