#include <bits/stdc++.h>
using namespace std;
int main() {
  size_t rnn;
  cin >> rnn;
  size_t rnsize = 2 * rnn;
  size_t rncnt = rnsize;
  vector<long> rnvec(rnsize);
  while (rncnt--) cin >> rnvec[rncnt];
  sort(rnvec.begin(), rnvec.end());
  long rnsum_fin = 999999;
  long rnsum = 0;
  for (size_t rncnt1 = 0; rncnt1 < rnsize; ++rncnt1)
    for (size_t rncnt2 = 0; rncnt2 < rncnt1; ++rncnt2) {
      rnsum = 0;
      for (size_t rncnt3 = 0, rnpos = 0; rncnt3 < rnsize; ++rncnt3)
        if (rncnt3 != rncnt1 && rncnt3 != rncnt2) {
          ++rnpos;
          if (rnpos % 2)
            rnsum -= rnvec[rncnt3];
          else
            rnsum += rnvec[rncnt3];
        }
      rnsum_fin = min(rnsum, rnsum_fin);
    }
  cout << rnsum_fin;
}
