#include <stdio.h>
int main(void)
{
double e;
double s = 0;
double a=0.5;
int i=1;
while(a>e)
{
i++;
s+=a;
a=1.0/(i*(i+1.0));
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiAKaW50IG1haW4odm9pZCkgCnsKICAgIGRvdWJsZSBlOwogICAgc2NhbmYgKCIlbGYiLCAmZSk7CiAgICBkb3VibGUgcyA9IDA7CiAgICBkb3VibGUgYT0wLjU7CiAgICBpbnQgaT0xOwogICAgd2hpbGUoYT5lKQogICAgICAgeyAKICAgICAgIAlpKys7CiAgICAgICAJcys9YTsKICAgICAgICBhPTEuMC8oaSooaSsxLjApKTsKICAgICAgIH0KICAgIHByaW50ZigiJTAuNGxmXG4iLCBzKTsKCXJldHVybiAwOwp9