A company purchased $5,600 worth of merchandise. Transportation costs were an additional $510. The company later returned $355 worth of merchandise and paid the invoice within the 4% cash discount period. The total amount paid for this merchandise is?