#include #include #include #include #include #include #include using namespace std; int main() { long long int n,sum=0,v; long double sai[1000050][7] = {}; cin >> n; sai[0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j <= 5; j++) { sai[i][j] += sai[i - 1][j] * (j) / 6; sai[i][j + 1] += sai[i - 1][j] * (6 - j) / 6; } sai[i][6] += sai[i - 1][6]; } cout << setprecision(15) << sai[n][6]<