#include <bits/stdc++.h>
long a[60];
int cmp(const void *a, const void *b) {
  if (*(long *)a < *(long *)b)
    return -1;
  else
    return 1;
}
int main() {
  long n, part, x, y, minsum, sum = 0, i, j, k, l;
  scanf("%ld", &n);
  part = n - 1;
  n = n << 1;
  for (i = 1; i <= n; i++) scanf("%ld", &a[i]);
  qsort(a + 1, n, sizeof(long), cmp);
  minsum = 2000000000;
  for (i = 1; i < n; i++)
    for (j = i + 1; j <= n; j++) {
      sum = 0;
      l = 1;
      for (k = 1; k <= part; k++) {
        while (l == i || l == j) l++;
        x = a[l];
        l++;
        while (l == i || l == j) l++;
        y = a[l];
        l++;
        sum += y - x;
      }
      if (minsum > sum) minsum = sum;
    }
  printf("%ld\n", minsum);
  return 0;
}
