#include
int main()
{float f=0.0,t=1.0;
int i;
for(i=1;t<=1e6;i++)
{t=t*i;
if(i%2)f+=1/t;
else f-=1/t;
}
printf("%.6f\n",f);
return 0;