n=input("n = ")
Long = 0 //question 5
z=0
for k=1:n+1
    z(k)=(-1-%i)*(%i)^(k-1)/(k)
    if k>=2 then Long=Long+abs(z(k)-z(k-1))//question 5
    end
end
clf
x=real(z);
y=imag(z);
plot2d(0,0,-1,"032"," ",[-1,-1,1,1])
xpoly(x(:,1),y(:,1),"lines",0)
afficher("Longueur = "+string(Long))// question 5
