The maths of exam marks