#include double E(int x, int K){ double sum; if( x >= K){ return 0.0; } sum = E(x+1,K) + E(x+2,K) + E(x+3,K) + E(x+4,K) + E(x+5,K) + E(x+6,K); sum /= 6; sum += 1; return sum; } int main(void){ int K; scanf("%d", &K); printf("%f\n", E(0, K)); return 0; }