#include "bits/stdc++.h" #define ALL(obj) (obj).begin(),(obj).end() #define RALL(obj) (obj).rbegin(),(obj).rend() #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define REPR(i, n) for(int i = (int)(n); i >= 0; i--) #define FOR(i,n,m) for(int i = (int)(n); i < int(m); i++) using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = MOD - 1; const ll LLINF = 4e18; int main() { int n; cin >> n; vector> dp(n + 1, vector(7, 0)); dp[0][0] = 1; FOR(i, 1, n + 1) { REP(j, 7) { dp[i][j] = dp[i - 1][j] * (double)(j)/6; if (j > 0) { dp[i][j] += dp[i - 1][j - 1] * ((double)(7 - j) / 6); } } } printf("%.10f", dp[n][6]); getchar(); getchar(); }