#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define MT make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)<; using vi = vector; using vll = vector; dbl dp[1 << 6]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); int N; cin >> N; FOR(S, 1, 1 << 6) { int x = 0; rep(i, 6)x += S >> i & 1; if (x > N) { dp[S] = 0; continue; } int T = S; do { // ここでsubに対する処理 dp[S] -= dp[T]; T = (T - 1) & S; } while (T != S); dp[S] += pow(x / 6.0, N); } cout << dp[(1 << 6) - 1] << endl; }