#include <bits/stdc++.h>
int main() {
  int n, p[1007], sum[2] = {0}, cur[2] = {1, 2};
  std::cin >> n;
  for (int i = 1; i <= n / 2; i++) std::cin >> p[i];
  std::sort(p + 1, p + 1 + n / 2);
  for (int i = 1; i <= n / 2; i++, cur[0] += 2, cur[1] += 2) {
    sum[0] += abs(cur[0] - p[i]);
    sum[1] += abs(cur[1] - p[i]);
  }
  std::cout << std::min(sum[0], sum[1]) << std::endl;
  return 0;
}
