A real-estate agent earns a commission on a house she sells. Her commission 5% on the first $500,000 ofthe sale price of the house. She then earns a 6% commission for the amount above $500,000 of the salé price of the house. How much commission did the agent earn if she sold a house for $585,000?