Fitness calculation for maximize example.