import java.util.*;
class Main
{
static double e
= Math.
exp(1);
static double bin_pow(double x, int n){
if(n == 1) return x;
if(n%2 == 1) return bin_pow(x, n-1)*x;
double b = bin_pow(x, n/2);
return b*b;
}
static double Rn(int n){
double v = e/(2*n+1);
return bin_pow(v, 2*n+1)/(1-v*v);
}
public static void main
(String[] args
) {
Scanner in
= new Scanner
(System.
in); double eps, sum = 0, last=0;
int n = 0;
eps = in.nextDouble();
do{
n++;
if(n > 1) last /= (2*n-2)*(2*n-1);
else last = 1;
sum += last;
} while(Rn(n) > eps);
System.
out.
print("Количество взятых членов ряда: " + n
+ "\nЗначение суммы: " + String.
format("%.10f",sum
)); }
}
aW1wb3J0IGphdmEudXRpbC4qOwoKY2xhc3MgTWFpbgp7CglzdGF0aWMgZG91YmxlIGUgPSBNYXRoLmV4cCgxKTsKCQoJc3RhdGljIGRvdWJsZSBiaW5fcG93KGRvdWJsZSB4LCBpbnQgbil7CgkJaWYobiA9PSAxKSByZXR1cm4geDsKCQlpZihuJTIgPT0gMSkgcmV0dXJuIGJpbl9wb3coeCwgbi0xKSp4OwoJCWRvdWJsZSBiID0gYmluX3Bvdyh4LCBuLzIpOwoJCXJldHVybiBiKmI7Cgl9CgoJc3RhdGljIGRvdWJsZSBSbihpbnQgbil7CgkJZG91YmxlIHYgPSBlLygyKm4rMSk7CgkJcmV0dXJuIGJpbl9wb3codiwgMipuKzEpLygxLXYqdik7Cgl9CgkKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKQoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBlcHMsIHN1bSA9IDAsIGxhc3Q9MDsKCQlpbnQgbiA9IDA7CgkJZXBzID0gaW4ubmV4dERvdWJsZSgpOwoJCWRvewoJCQluKys7CgkJCWlmKG4gPiAxKSBsYXN0IC89ICgyKm4tMikqKDIqbi0xKTsKCQkJZWxzZSBsYXN0ID0gMTsKCQkJc3VtICs9IGxhc3Q7CgkJfSB3aGlsZShSbihuKSA+IGVwcyk7CgkJU3lzdGVtLm91dC5wcmludCgi0JrQvtC70LjRh9C10YHRgtCy0L4g0LLQt9GP0YLRi9GFINGH0LvQtdC90L7QsiDRgNGP0LTQsDogIiArIG4gKyAiXG7Ql9C90LDRh9C10L3QuNC1INGB0YPQvNC80Ys6ICIgKyBTdHJpbmcuZm9ybWF0KCIlLjEwZiIsc3VtKSk7Cgl9Cn0=