sums the min and max numbers in a list