int main()
{
int temp,flag;
double eps,item,sum;
scanf("%lf",&eps);
/*﹉﹉﹉﹉*/
sum=1,item=1;
for(temp=1;item>=eps;)
{temp+=2;
item=1.0/temp;
sum+=temp%4==1?item:-item;
}
printf("%.6f\n",sum);
return 0;
}