Calculates max score