#include #include #include #include #include double f(double x) { if (abs(x)<1e-9) { return 1; } else { double v=std::sin(x)/x; return v*v; } } int main() { double ans=0; int n=(int)1e7; double x=0; std::cin>>x; for (int i=0;i<=n;++i) ans+=f(i+x); ans+=1/(2*(x+n+0.5)); printf("%.20f\n", ans); }