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