// Arup Guha
// 7/1/2015
// Solution to Proposed Problem for 2015 South East Regional D2: Guaranteed Excellence

import java.util.*;

public class excellence {

    public static void main(String[] args) {

        Scanner stdin = new Scanner(System.in);
        int n = stdin.nextInt();

        // Read in the values and sort them.
        int[] vals = new int[n];
        for (int i=0; i<n; i++)
            vals[i] = stdin.nextInt();
        Arrays.sort(vals);

        // Find the "opposing" pair with minimal sum.
        int res = vals[0] + vals[n-1];
        for (int i=1; i<n/2; i++)
            res = Math.min(res, vals[i]+vals[n-1-i]);
        System.out.println(res);
    }
}
