#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> w;
  for (int i = 0; i < 2 * n; i++) {
    int t;
    scanf("%d", &t);
    w.push_back(t);
  }
  sort(w.begin(), w.end());
  long long sum = LONG_MAX;
  for (int i = 0; i < 2 * n; i++) {
    for (int j = i + 1; j < 2 * n; j++) {
      long long t = 0;
      int flag = -1;
      for (int k = 2 * n - 1; k >= 0; k--) {
        if (k != i && k != j) {
          t += (flag * (-1) * w[k]);
          flag = -1 * flag;
        }
      }
      if (t <= sum) {
        sum = t;
      }
    }
  }
  cout << sum << endl;
  return 0;
}
