// yukicoder: No.567 コンプリート // 2019.7.27 bal4u #include #include int main() { int n; double ans; scanf("%d", &n); ans = 1 - 6*(pow(5.0/6, n)+pow(1.0/6, n)) + 15*(pow(2.0/3, n)+pow(1.0/3, n)) - 20*pow(1.0/2, n); printf("%.12lf\n", ans); return 0; }