Damien McCoy has loaned money to his brother at an interest rate of 5.85 percent. He expects to receive $987, $1,012, $1,062, and $1,162 at the end of the next four years as complete repayment of the loan with interest. How much did he loan out to his brother? (Round to the nearest dollar.)