After the initial donation and purchase, a local library had added a total of 5059 books and 3653 books to their collection. Later on, a graduate student donated an additional 500 books from his personal collection. How many books were added to the library's collection in total?