In one move you may increase or decrease any single element by 1. Find the minimum total number of moves needed to make every element of the array equal.
Input format
Line 1: an integer n.
Line 2: n space-separated integers (present whenever n >= 1).
Output format
One line: the minimum total number of moves.
Constraints
- 1 <= n <= 100000
- -1000000 <= each value <= 1000000