#include <bits/stdc++.h>
using namespace std;
vector<int> a;
long long judge(vector<int> a) {
  int ans = 0;
  int len = a.size() / 2;
  for (int i = 0; i < len; i++) {
    ans += a[2 * i + 1] - a[2 * i];
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  a.resize(2 * n);
  int num = 2 * n;
  for (int i = 0; i < num; i++) cin >> a[i];
  sort(a.begin(), a.end());
  long long sum = 1 << 20;
  for (int i = 0; i < a.size(); i++) {
    for (int j = i + 1; j < a.size(); j++) {
      vector<int> w = a;
      w.erase(w.begin() + j);
      w.erase(w.begin() + i);
      sum = min(judge(w), sum);
    }
  }
  cout << sum << endl;
}
