Sum of an array with adding/subtracting operations on all the elements.