#include using namespace std; using ld = long double; int main() { vector dp(7); dp[0] = 1; int N; cin >> N; for (int i = 0; i < N; i++) { auto t = dp; fill(dp.begin(), dp.end(), (ld)0); for (int j = 0; j <= 6; j++) { dp[j] += t[j] * ((ld)j / 6); if (j != 6) dp[j + 1] += t[j] * ((ld)(6 - j) / 6); } } cout << fixed << setprecision(9) << dp[6] << endl; return 0; }