#include <bits/stdc++.h>
using namespace std;
using INT = long long;
using pii = pair<int, int>;
const int NN = 1010;
int a[NN], b[NN], N;
int solve() {
  int ans = 0;
  sort(b, b + N);
  for (int i = 1; i < N; i += 2) ans += b[i] - b[i - 1];
  return ans;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n << 1; i++) scanf("%d", a + i);
  int ans = 1e9;
  for (int i = 1; i <= n << 1; i++) {
    for (int j = i + 1; j <= n << 1; j++) {
      N = 0;
      for (int k = 1; k <= n << 1; k++)
        if (k ^ i && k ^ j) {
          b[N++] = a[k];
        }
      ans = min(ans, solve());
    }
  }
  printf("%d", ans);
}
