summands_sum([], 0).
summands_sum([I|Is], S1) :-
	sum(I, S2, S1),
	summands_sum(Is, S2).

summands_n_sum(Is,N,S) :-
	length(Is,N),
	summands_sum(Is, S).

:- summands_n_sum(Is, 6, S).
-----         n599 ------------------------
Say, we want to specialize this goal.
**NEXT:add pe to the goal.
[logprog|GUPU|UWN]