#include <bits/stdc++.h>
using namespace std;
long n, m, diff, total;
long a[105], b[105];
bool fl = false;
int main() {
  memset(a, 0, 105);
  memset(b, 0, 105);
  cin >> n;
  m = 2 * n;
  total = 1e9;
  diff = 0;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      for (int k = 0; k < m; k++) {
        b[k] = a[k];
      }
      b[i] = b[j] = 0;
      sort(b, b + m);
      diff = 0;
      for (int k = 2; k < m - 1; k += 2) {
        diff += (b[k + 1] - b[k]);
      }
      total = min(diff, total);
    }
  }
  cout << total << "\n";
  return 0;
}
