#include using namespace std; typedef long long ll; int main(void) { ll N; cin >> N; double dp[N+1][7]; dp[1][0] = 0; dp[1][1] = 1; for (int i=2; i<=6; i++) dp[1][i] = 0; for (int i=2; i<=N; i++) for (int j=1; j<=6; j++) { dp[i][j] = ( (dp[i-1][j] * j) + (dp[i-1][j-1] * (7-j)) ) / 6; } printf("%.10f\n",dp[N][6]); return 0; }