#include <bits/stdc++.h>
void paixu(int a[], int n) {
  int i, j;
  int temp;
  for (i = n - 1; i >= 0; i--) {
    for (j = 0; j < i; j++) {
      if (a[j] >= a[j + 1]) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
      }
    }
  }
}
int main() {
  int n, i;
  int even = 0, odd = 0;
  int a[100] = {0};
  scanf("%d", &n);
  n = n / 2;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  paixu(a, n);
  for (i = 0; i < n; i++) {
    even = even + abs(2 * i + 2 - a[i]);
  }
  for (i = 0; i < n; i++) {
    odd = odd + abs(2 * i + 1 - a[i]);
  }
  if (odd >= even)
    printf("%d\n", even);
  else
    printf("%d\n", odd);
  return 0;
}
