#include <stdio.h>
double xiang (int n);
double sum (int n);
int main ()
{
int n = 1;
double e, pi;
scanf("%lf",&e);
while (2*(xiang(n)) >= e) n++;
printf("%d %.7lf",n,2*sum(n));
}
double xiang (int n)
{
if (n==1) return 1;
if (n==2) return 1.0/3;
return (xiang (n-1)) * (n-1)/(2*n-1);
}
double sum (int n) {
if (n==1) return 1;
return xiang (n) + sum (n-1);
}
#include<stdio.h>
double zixiang(int n);
int main() {
double x, pi=0 ,pai;
int k,n;
scanf("%lf",&x);
for (int i = 2; ; i++)
{
pi=pi+(double)zixiang(i);
printf("前%d项对应的pi是%lf,pai=%.10lf.迭代差%.7lf\n",i,pi,2*pi+2,2*zixiang(i));
if(2*zixiang(i)<=x)
{pai=2*pi+2; k= i;break;}
}
printf("迭代差%lf的pai值= %.10lf",2*zixiang(k),pai);
printf(" 第%d位",k);
}
double zixiang(int n)
{if (n==2) return 1.0/3;
else
return (zixiang(n-1))*((double)(n-1)/(2*n-1));
}