A school gets a big donation and adds ten rooms. This reduces the average numbe of pupils per room by ten. After two months, a storm badly damages five rooms forcing the school to close them. This causes the average number of pupils per room to increase by four. The number of pupils at the school remains constant throughou this time. How many pupils are at the school? Justify your answer with working.