Calculate the maximum sum in a triangle moving to adjacent columns in the next row