#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.setf(ios::fixed); cout.precision(10); int n; cin >> n; cout << 1 - 6 * pow(1.0 / 6, n) + 15 * pow(2.0 / 6, n) - 20 * pow(3.0 / 6, n) + 15 * pow(4.0 / 6, n) - 6 * pow(5.0 / 6, n) + 1e-12 << endl; }