John saw a sale on his favorite books and decided to buy 8 books using the money he had in his wallet. If each book cost the amount equal to the money he had in his wallet, how much did he spend on books?