Joe bought 3 books. The second book cost 4 dollars more than the first book, the third book cost twice as much as the second book. How much was each book if he spent $36 total?