sum([], X, X).
sum([1|T], X, [1|Y]) :- sum(T, X, Y).
