Optimization criterion

 

As I understand, max balance is final max balance.