You can search this statistic (normalized so that the smallest value is 0) in www.FindStat.org and you will find that this is the rank of the permutation inside the lattice of alternating sign matrices. You find further information at http://www.findstat.org/St000055.