Tom takes medication to help him sleep. He takes 2 pills every day before bed. He needs to go to the doctor every 6 months to get a new prescription and a visit to the doctor costs $400. The medication costs $5 per pill, but insurance covers 80% of that cost. How much does he pay a year for everything?