program pil_5_20_b(input,output);
var
	k : integer;
	result, next : real;
	x, eps : real;
begin
	write('Input x and eps : ');
	read(x, eps);
  next := x;
  result := 0;
  k := 1;
	while abs(next) > eps do begin
  	result := result + next;
		inc(k);
    next := next * (x*x)/( k*(k+1) );
		inc(k);
  end;
	WriteLn('Result is ', result);
end.