#include <stdio.h> int n; double dp[1000001][7]; int main() { scanf("%d", &n); dp[0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= 6; j++) { dp[i + 1][j] += dp[i][j] * j / 6.0; if (j < 6) { dp[i + 1][j + 1] += dp[i][j] * (6.0 - j) / 6.0; } } } printf("%.14f\n", dp[n][6]); return 0; }