function le=lege(n,N)
le=0;
for k=0:n 
    le=le+(-1)^k*nchoosek(n,k)*bernstein(n,k,N);
end
le=(-1)^n*le;
 