#include using namespace std; #define FOR(i, n) for(int i = 0; i < (n); i++) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) typedef long long ll; typedef pair P; int n; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin >> n; double one = pow(1/6.0, n); double two = pow(2/6.0, n) - 2*one; double three = pow(3/6.0, n) - 3*one - 3*two; double four = pow(4/6.0, n) - 4*one - 6*two - 4*three; double five = pow(5/6.0, n) - 5*one - 10*two - 10*three - 5*four; double six = 1.0 - 6*one - 15*two - 20*three - 15*four - 6*five; printf("%.10lf\n", six); return 0; }