On Monday, the average number of books donated by each pupil during a donation drive was 23. On Tuesday, 30 pupils donated an average of 14 books each. In the end, the average number of books donated by each pupil on both days was 20. How many books were donated on Monday?