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