Dimitrius returned 5 library books last week, returned 3 books this week , and then checked out 8 more books. He now has 12 library books. How many books did he have before last week?