Permutation $*p*$ is an ordered set of integers $*p*_{1}, *p*_{2}, ..., *p*_{*n*}$, consisting of $*n*$ distinct positive integers, each of them doesn't exceed $*n*$. We'll denote the $*i*$-th element of permutation $*p*$ as $*p*_{*i*}$. We'll call number $*n*$ the size or the length of permutation $*p*_{1}, *p*_{2}, ..., *p*_{*n*}$.
You have a sequence of integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$. In one move, you are allowed to decrease or increase any number by one. Count the minimum number of moves, needed to build a permutation from this sequence.
Input
The first line contains integer $*n*$ ($1 ≤ *n* ≤ 3·10^{5}$) — the size of the sought permutation. The second line contains $*n*$ integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$ ($- 10^{9} ≤ *a*_{*i*} ≤ 10^{9}$).
Output
Print a single number — the minimum number of moves.
Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.
Note
In the first sample you should decrease the first number by one and then increase the second number by one. The resulting permutation is $(2, 1)$.
In the second sample you need 6 moves to build permutation $(1, 3, 2)$.
样例
2
3 0
2
3
-1 -1 2
6
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。