#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; int main(){ int n; cin >> n; vector C = {6,15,20,15,6}; vector res(5,1.0); rep(i,n)rep(j,5){ res[j] *= (j+1)/6.0; } double ans = 0; for(int i=1;i<=6;i++){ if(i%2==0) ans -= C[i-1] * res[i-1]; else ans += C[i-1] * res[i-1]; } cout << setprecision(20) << 1 - ans << endl; return 0; }