The maximum amount a consumer would be willing to pay for a given quantity of a good is the sum of the maximum price they would pay for the first unit, the (lower) maximum price they would be willing to pay for the second unit, etc. Typically these prices are decreasing; they are given by the individual demand curve, which must be generated by a rational consumer who maximizes utility subject to a budget constraint. Because the demand curve is downward sloping, there is diminishing marginal utility. Diminishing marginal utility means a person receives less additional utility from an additional unit. However, the price of a product is constant for every unit at the equilibrium price. The extra money someone would be willing to pay for the number units of a product less than the equilibrium quantity and at a higher price than the equilibrium price for each of these quantities is the benefit they receive from purchasing these quantities. For a given price the consumer buys the amount for which the consumer surplus is highest. The consumer's surplus is highest at the largest number of units for which, even for the last unit, the maximum willingness to pay is not below the market price.