#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2333;
long long l[N], r[N], n;
long long sl, sr;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%I64d", &l[i]);
  for (int i = 0; i < n; ++i) scanf("%I64d", &r[i]);
  sort(l, l + n);
  sort(r, r + n);
  int cl, cr;
  cl = cr = n - 1;
  for (int i = 0; i < n; ++i) {
    if ((cr >= 0 && l[cl] < r[cr]) || cl < 0)
      cr--;
    else
      sl += l[cl--];
    if ((cl >= 0 && l[cl] > r[cr]) || cr < 0)
      cl--;
    else
      sr += r[cr--];
  }
  printf("%I64d\n", sl - sr);
  return 0;
}
