Given a two-dimensional square array of integers, compute the sum of all elements that are not on one of the diagonals.