#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100005;
const long long maxk = 1005;
long long a[maxn];
long long b[maxn];
long long n;
long long pa, pb;
long long sma, smb;
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);
  pa = n - 1;
  pb = n - 1;
  while (pa >= 0 || pb >= 0) {
    if (pa >= 0 && a[pa] >= b[pb])
      sma += a[pa--];
    else
      pb--;
    if (pb >= 0 && b[pb] >= a[pa])
      smb += b[pb--];
    else
      pa--;
  }
  cout << sma - smb << '\n';
  return 0;
}
