Terrell invested $1000 into a 3-year CD that earns 4% APR and is compounded quarterly. The early redemption fee is 3 months' interest. Terrell needed to take out his money 3 months before the CD matured. How much money did he receive after the early redemption fee was taken out?