John decides to learn how to play the piano. He buys a piano for $500. He then hires a teacher for 20 lessons at $40 per lesson but ends up getting a 25% discount. How much did everything cost?