#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> K; for(i=1;i<=K;i++){ dp[i]=1.0; for(j=1;j<=6;j++){ if(i-j<=0) continue; dp[i]+=dp[i-j]/6; } } cout << fixed << setprecision(12) << dp[K] << endl; return 0; }