#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
double e = exp(1);
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;
}
double Rn(int n){
double v = e/(2*n+1);
return bin_pow(v, 2*n+1)/(1-v*v);
}
int main() {
double eps, sum = 0, last=0;
int n = 0;
cin >> eps;
do{
n++;
if(n > 1) last /= (2*n-2)*(2*n-1);
else last = 1;
sum += last;
} while(Rn(n) > eps);
cout << fixed << setprecision(10) << "Количество взятых членов ряда: " << n << "\nЗначение суммы: " << sum;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KI2luY2x1ZGUgPGNtYXRoPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKZG91YmxlIGUgPSBleHAoMSk7Cgpkb3VibGUgYmluX3Bvdyhkb3VibGUgeCwgaW50IG4pewoJaWYobiA9PSAxKSByZXR1cm4geDsKCWlmKG4lMiA9PSAxKSByZXR1cm4gYmluX3Bvdyh4LCBuLTEpKng7Cglkb3VibGUgYiA9IGJpbl9wb3coeCwgbi8yKTsKCXJldHVybiBiKmI7Cn0KCmRvdWJsZSBSbihpbnQgbil7Cglkb3VibGUgdiA9IGUvKDIqbisxKTsKCXJldHVybiBiaW5fcG93KHYsIDIqbisxKS8oMS12KnYpOwp9CgppbnQgbWFpbigpIHsKCWRvdWJsZSBlcHMsIHN1bSA9IDAsIGxhc3Q9MDsKCWludCBuID0gMDsKCWNpbiA+PiBlcHM7Cglkb3sKCQluKys7CgkJaWYobiA+IDEpIGxhc3QgLz0gKDIqbi0yKSooMipuLTEpOwoJCWVsc2UgbGFzdCA9IDE7CgkJc3VtICs9IGxhc3Q7Cgl9IHdoaWxlKFJuKG4pID4gZXBzKTsKCWNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDEwKSA8PCAi0JrQvtC70LjRh9C10YHRgtCy0L4g0LLQt9GP0YLRi9GFINGH0LvQtdC90L7QsiDRgNGP0LTQsDogIiA8PCBuIDw8ICJcbtCX0L3QsNGH0LXQvdC40LUg0YHRg9C80LzRizogIiA8PCBzdW07CglyZXR1cm4gMDsKfQ==