#include using namespace std; using ll = long long; double p[6]; double E[6]; vector dp; int main() { int t; cin >> t; E[0] = 1.0000000000000000; E[1] = 1.0833333333333333; E[2] = 1.2569444444444444; E[3] = 1.5353009259259260; E[4] = 1.6915991512345676; E[5] = 2.0513639724794235; p[0] = E[1]-1; p[1] = E[2]-E[1]*p[0]-1; p[2] = E[3]-E[2]*p[0]-E[1]*p[1]-1; p[3] = E[4]-E[3]*p[0]-E[2]*p[1]-E[1]*p[2]-1; p[4] = E[5]-E[4]*p[0]-E[3]*p[1]-E[2]*p[2]-E[1]*p[3]-1; p[5] = 1-p[0]-p[1]-p[2]-p[3]-p[4]; for(int ii = 0;ii(1000010,0); int x; cin >> x; for(int i = x-1;i>=0;i--) { for(int j = 0;j<6;j++) { dp[i] += (dp[i+j+1]+1.0)*p[j]; } } printf("%.15lf\n",dp[0]); } return 0; }