import java.io.*;
import java.util.*;

public class Other {

    PrintWriter out;
    BufferedReader in;
    StringTokenizer tok = new StringTokenizer("");

    void solve() throws Exception {
        int n = readInt()/2;
        int[] table = new int[n];
        int countBlack = 0;
        int countWhite = 0;

        for(int i = 0; i < n; ++i ) {
            table[i] = readInt();
        }
        Arrays.sort(table);

        for(int i = 0; i < n; ++i ) {
            countBlack += Math.abs(table[i] - ((i+1)*2-1));
            countWhite += Math.abs(table[i] - (i+1)*2);
        }

        out.println(Math.min(countBlack, countWhite));
    }

    void init() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    public static void main(String[] args) {
        new Other().run();
    }

    String readLine(){
        try{
            return in.readLine();
        } catch (IOException e){
            throw new RuntimeException(e);
        }
    }

    String delim = " ";

    String readString() {
        while(!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (nextLine == null) return null;

            tok = new StringTokenizer(nextLine, delim);
        }

        return tok.nextToken(delim);
    }

    int readInt(){ return Integer.parseInt(readString()); }

    long readLong() { return Long.parseLong(readString()); }

    void run(){
        try {
            init();
            solve();
            out.close();
        } catch (Exception e){
            e.printStackTrace();
            System.exit(-1);
        }
    }
}


