#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n, a=1, as=a, b=1;
double S=0.0, u=2.0;
cin >> n;
for(int i=1, k=2; i<=n; i++, k++)
{
a=3*b+2*a;
b=2*as+b;
u*=(2.0/k);
S+=u*(1.0/(1+a*a+b*b));
as=a; //запоминание переменной а
}
printf("%7lf", S);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgYT0xLCBhcz1hLCBiPTE7Cglkb3VibGUgUz0wLjAsIHU9Mi4wOwoJY2luID4+IG47Cglmb3IoaW50IGk9MSwgaz0yOyBpPD1uOyBpKyssIGsrKykKCXsKCQlhPTMqYisyKmE7CgkJYj0yKmFzK2I7CgkJdSo9KDIuMC9rKTsKCQlTKz11KigxLjAvKDErYSphK2IqYikpOwoJCWFzPWE7CQkJLy/Qt9Cw0L/QvtC80LjQvdCw0L3QuNC1INC/0LXRgNC10LzQtdC90L3QvtC5INCwCgl9CglwcmludGYoIiU3bGYiLCBTKTsKCXJldHVybiAwOwp9