A company purchased $4,000 worth of merchandise. Transportation costs were an additional $400. The company later returned $445 worth of merchandise and paid the invoice within the 3% cash discount period. The total amount paid for this merchandise is: