#include using namespace std; const int MAX = 1e6 + 10; long double dp[MAX][7]; int main() { int n; cin >> n; dp[0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j < 6; j++) { long double hoge = dp[i][j] / 6; dp[i + 1][j + 1] += hoge * (6 - j); dp[i + 1][j] += hoge * j; } dp[i + 1][6] += dp[i][6]; } cout << fixed << setprecision(10) << dp[n][6] << endl; return 0; }