#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; auto check= [&](double x){ vector dp(n+1,0); dp[n]=x; dp[0]=0; for(int i=1;i<=n;i++){ dp[i]=1; for(int j=1;j<=6;j++) dp[i]+=(i-j<0?x:dp[i-j])/6; } return dp[n]>=x; }; double l=0,r=1e9; for(int k=0;k<200;k++){ double m=(l+r)/2; if(check(m)) l=m; else r=m; } cout<