#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef vector VVL; typedef pair P; typedef pair PL; double dp[1000001][7]; int main(){ int n; cin >> n; dp[0][0] = 1.0; REP(i,n) FOR(j,0,6){ dp[i+1][j+1] += (6.0 - j) / 6.0 * dp[i][j]; dp[i+1][j] += j / 6.0 * dp[i][j]; } printf("%.10f\n", dp[n][6]); // FOR(i,1,n){ // FOR(j,1,6) cout << dp[i][j] << " "; // cout << endl; // } return 0; }