
import java.awt.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class A {	
	public static int n=0;
	public static int a[]=new int [110];
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		InputReader in=new InputReader(System.in);
		PrintWriter out=new PrintWriter(System.out);
		n=in.nextInt();
		for(int i=1;i<=n/2;i++) 
			a[i]=in.nextInt();
		Arrays.sort(a, 1,1+n/2);
		int ans1=0,ans2=0;
		for(int i=1;i<=n/2;i++) {
			ans1+=Math.abs(i*2-1-a[i]);
			ans2+=Math.abs(i*2-a[i]);
		}
		//System.out.print(ans1+" "+ans2);
		out.print(Math.min(ans1, ans2));
		out.close();
	}
	
	public static class InputReader{
		public BufferedReader rea;
		public StringTokenizer tok;
		public InputReader(InputStream stream) {
			rea=new BufferedReader(new InputStreamReader(stream),32768);
			tok=null;
		}
		public String next() {
			while(tok==null||!tok.hasMoreTokens()) {
				try{
					tok=new StringTokenizer(rea.readLine());
				} catch(IOException e){
					throw new RuntimeException(e);
				}
			}
			return tok.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}
