#include int main(){double s=0,t;int i,n;scanf("%d",&n);for(i=1;i<=n;i++){t=i*i; if(i%2)s+=1-1/t; else s-=1-1/t;}printf("%.3lf\n",s);return 0;}