#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[101];
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= n / 2; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n / 2 + 1);
  int sum = 0;
  for (int i = n / 2; i >= 1; i--) {
    sum += abs(a[i] - (i * 2));
  }
  int sum1 = 0;
  for (int i = n / 2; i >= 1; i--) {
    sum1 += abs(a[i] - (i * 2 - 1));
  }
  cout << min(sum, sum1) << endl;
  return 0;
}
