#include <bits/stdc++.h>
using namespace std;
const long long mx = 223456;
long long n, a[mx], b[mx], sum1, sum2, ca, cb;
int32_t main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  sort(a, a + n);
  sort(b, b + n);
  ca = n - 1;
  cb = n - 1;
  for (long long i = 0; i < n * 2; i++) {
    long long y = 0;
    if (i % 2 == 0) {
      if (ca >= 0 && cb >= 0) {
        if (a[ca] > b[cb]) {
          sum1 += a[ca];
          ca--;
        } else {
          cb--;
        }
        y = 1;
      }
      if (ca < 0 && y == 0) {
        cb--;
        y = 1;
      }
      if (cb < 0 && y == 0) {
        sum1 += a[ca];
        ca--;
        y = 1;
      }
    } else {
      if (ca >= 0 && cb >= 0) {
        if (a[ca] < b[cb]) {
          sum2 += b[cb];
          cb--;
        } else {
          ca--;
        }
        y = 1;
      }
      if (cb < 0 && y == 0) {
        ca--;
        y = 1;
      }
      if (ca < 0 && y == 0) {
        sum2 += b[cb];
        cb--;
        y = 1;
      }
    }
  }
  cout << sum1 - sum2;
  return 0;
}
