#include <iostream>
#include <math.h>
using namespace std;
int main() {
double curr = sqrt(2.0)/2; //Перменная для сравнения
double mul = 1; //Произведение
double e = 1.0e-6; //Точность
int count = 1; //Счетчик
for(;fabs(mul - curr) > e;count++){
mul *= (1. + (count % 2 ? (-1) : 1)/(2.*count + 1));
}
printf("%d",count);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglkb3VibGUgY3VyciA9IHNxcnQoMi4wKS8yOyAvL9Cf0LXRgNC80LXQvdC90LDRjyDQtNC70Y8g0YHRgNCw0LLQvdC10L3QuNGPCglkb3VibGUgbXVsID0gMTsgICAvL9Cf0YDQvtC40LfQstC10LTQtdC90LjQtQoJZG91YmxlIGUgPSAxLjBlLTY7ICAvL9Ci0L7Rh9C90L7RgdGC0YwKCWludCBjb3VudCA9IDE7IC8v0KHRh9C10YLRh9C40LoKCWZvcig7ZmFicyhtdWwgLSBjdXJyKSA+IGU7Y291bnQrKyl7CgkJbXVsICo9ICgxLiArIChjb3VudCAlIDIgPyAoLTEpIDogMSkvKDIuKmNvdW50ICsgMSkpOwoJfQoJcHJpbnRmKCIlZCIsY291bnQpOyAKCXJldHVybiAwOwp9