import java.io.*;
import java.util.*;
import java.math.*;
import java.util.concurrent.*;

public final class chess_piece
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static int[] a;
	
    public static void main(String args[]) throws Exception
    {	
		int n=sc.nextInt(),m=n/2;
		
		a=new int[m];
		
		for(int i=0;i<m;i++)
		{
			a[i]=sc.nextInt();
		}
		
		Arrays.sort(a);
		
		int val1=0,val2=0;
		
		for(int i=1,j=0;i<=n;i+=2,j++)
		{
			val1+=Math.abs(a[j]-i);
		}
		
		for(int k=2,j=0;k<=n;k+=2,j++)
		{
			val2+=Math.abs(a[j]-k);
		}
		
		out.println(val1+" "+val2);
		
		out.println(Math.min(val1,val2));out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}