program lnx(input,output);
const eps=0.000000000001;
var x,y,a:real;
    n:integer;
begin
 write('vvedite x(|x|<1): '); read(x);
 y:=x; n:=2; a:=x;
 while abs(a)>=eps do
   begin a:=-a*x/n; y:=y+1; n:=n+1 end;
 writeln('ln(1+x)=',y:1:4);
end.