Sums the values of an assigned quantity from the point till the outlet. The final result is then a matrix of values containing the sum of the quantity in input on all upriver points:
S=sumij Aj
where i is the point examined and the index j varies on all points upriver with respect to the point examined.

Inputs



Output