#include using namespace std; double dp[7]; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; dp[0] = 1; for (int i = 0; i < n; i++) { for (int j = 5; j >= 0; j--) { dp[j + 1] += dp[j] * (6 - j) / 6; dp[j] = dp[j] * j / 6; } } cout << fixed << setprecision(10) << dp[6] << endl; return 0; }