#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, s, ans = 500000, a[100];
  vector<int> v;
  cin >> n;
  n *= 2;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (i = 0; i < n; ++i) {
    for (j = i + 1; j < n; ++j) {
      v.clear();
      s = 0;
      for (k = 0; k < n; ++k) {
        if (k != i && k != j) {
          v.push_back(a[k]);
        }
      }
      for (k = 1; k < v.size(); k += 2) {
        s += (v[k] - v[k - 1]);
      }
      ans = min(ans, s);
    }
  }
  cout << ans;
  return 0;
}
