Given a two-dimensional array of integers, return the sum of all elements along all borders but not the corners.