First input is number of elements.
Second input is array of integers.
Find the sum of differences between good number