A wizard has 999 spells in his book. He tries to distribute them equally among 951 apprentice wizards but they don't divide evenly. How many spells will the wizard have left after giving out as many as he can to his apprentices?