#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long MAX = 5100000; const long long INF = 1LL << 60; //const long long mod = 1000000007LL; //const long long mod = 998244353LL; using namespace std; typedef unsigned long long ull; typedef long long ll; int main() { /* cin.tie(nullptr); ios::sync_with_stdio(false); */ int n; scanf("%d", &n); vector> dp(n + 1, vector(8)); dp[0][0] = 1; for (ll i = 0; i < n; i++) { for (ll j = 0; j <= 6; j++) { dp[i + 1][j + 1] += dp[i][j] * (6 - j) / 6.0; dp[i + 1][j] += dp[i][j] * j / 6.0; } } cout << fixed << setprecision(12) << dp[n][6] << endl; return 0; }