#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[55 * 2];
int ans;
int cnt;
int xx;
int main() {
  cin >> n;
  n = 2 * n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + n);
  xx = 0x7FFFFFFF;
  for (int i = 1; i < n; i++) {
    int t1 = a[i];
    a[i] = 0x7FFFFFFF;
    for (int j = i + 1; j <= n; j++) {
      int t2 = a[j];
      a[j] = 0x7FFFFFFF;
      for (int k = 1; k <= n; k++) {
        if (a[k] == 0x7FFFFFFF) continue;
        ++cnt;
        if (cnt % 2 == 1)
          ans -= a[k];
        else
          ans += a[k];
      }
      xx = min(ans, xx);
      cnt = 0;
      ans = 0;
      a[j] = t2;
    }
    a[i] = t1;
  }
  cout << xx << endl;
  return 0;
}
