function  out=EggHolder(X)

n=size(X,2)-1;
r=[];
for i=1:n
r=[-(X(:,i+1)+47).*sin(sqrt(abs( X(:,i+1)+X(:,i)/2+47 ) ))  -  sin( sqrt(abs( X(:,i)-X(:,i+1)-47 ) )  ).*X(:,i) ,r]; 
end

out=sum(r,2);
