#include using namespace std; #define FOR(i,l,r) for(int i = int(l);i < int(r);i++) template bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; } template bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; } typedef long long ll; int N; const int MAX_N = 10000; double dp [MAX_N + 1] [1 << 6]; int main() { scanf("%d",&N); chmin(N,MAX_N); dp [0] [0] = 1.0; FOR(i,0,N) FOR(j,0,1 << 6){ FOR(k,0,6){ dp [i + 1] [j | (1 << k)] += dp [i] [j] / 6.0; } } printf("%.17f\n",dp [N] [(1 << 6) - 1]); return 0; }