#include <bits/stdc++.h>
using namespace std;
int s[200], t[200];
int main() {
  int N, re = 0x3f3f3f3f;
  scanf("%d", &N);
  for (int i = 1; i <= 2 * N; i++) {
    scanf("%d", &s[i]);
  }
  sort(s + 1, s + 1 + 2 * N);
  for (int i = 1; i <= 2 * N; i++)
    for (int j = i + 1; j <= 2 * N; j++) {
      int tot = 0, ans = 0;
      for (int c = 1; c <= 2 * N; c++)
        if (c != i && c != j) {
          tot++;
          t[tot] = s[c];
        }
      sort(t + 1, t + 1 + tot);
      for (int i = 1; i <= tot; i += 2) {
        ans += t[i + 1] - t[i];
      }
      re = min(re, ans);
    }
  printf("%d", re);
  return 0;
}
