#include using namespace std; vector memo(30,-1); double E(int x,int K){ if(x>=K)return 0; if(memo[x]!=-1)return memo[x]; double c=(E(x+1,K)+E(x+2,K)+E(x+3,K)+E(x+4,K)+E(x+5,K)+E(x+6,K))/6+1; memo[x]=c; return c; } int main(){ int K;cin>>K; cout<