#include <bits/stdc++.h>
using namespace std;
int n;
int b[100005];
int a[100005];
long long suma, sumb;
int maxa, maxb;
int ita, itb;
int flag;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  ita = n;
  itb = n;
  maxa = a[ita];
  maxb = b[itb];
  flag = 1;
  while (ita != 0 || itb != 0) {
    if (flag == 1) {
      if (maxa >= maxb) {
        suma += maxa;
        ita--;
        maxa = a[ita];
        flag = 0;
      }
    }
    if (flag == 1) {
      if (maxa < maxb) {
        itb--;
        maxb = b[itb];
        flag = 0;
      }
    }
    if (ita == 0 && itb == 0) break;
    if (flag == 0) {
      if (maxb >= maxa) {
        sumb += maxb;
        itb--;
        maxb = b[itb];
        flag = 1;
      }
    }
    if (flag == 0) {
      if (maxb < maxa) {
        ita--;
        maxa = a[ita];
        flag = 1;
      }
    }
  }
  cout << suma - sumb << endl;
  return 0;
}
