#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  long long a[n], b[n];
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < n; ++i) cin >> b[i];
  multiset<long long> c, d;
  for (long long i = 0; i < n; ++i) c.insert(a[i]), d.insert(b[i]);
  long long sca = 0, scb = 0;
  for (long long i = 0; i < n; ++i) {
    auto it1 = c.end(), it2 = d.end();
    long long ma1 = c.size() ? *--it1 : -1, ma2 = d.size() ? *--it2 : -1,
              ma = max(ma1, ma2);
    if (ma == ma1)
      sca += ma1, c.erase(it1);
    else
      d.erase(it2);
    it1 = c.end(), it2 = d.end();
    ma1 = c.size() ? *--it1 : -1, ma2 = d.size() ? *--it2 : -1,
    ma = max(ma1, ma2);
    if (ma == ma2)
      scb += ma2, d.erase(it2);
    else
      c.erase(it1);
  }
  cout << sca - scb;
  return 0;
}
