#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005], b[100005];
long long da[100005], db[100005];
int main() {
  int n;
  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);
  long long A = 0, B = 0;
  int ind1 = n, ind2 = n;
  while (true) {
    if (ind1 == 0 and ind2 == 0) break;
    if (a[ind1] >= b[ind2] and ind1 > 0) {
      A += a[ind1];
      ind1--;
    } else {
      if (ind2 > 0) ind2--;
    }
    if (ind1 == 0 and ind2 == 0) break;
    if (b[ind2] >= a[ind1] and ind2 > 0) {
      B += b[ind2];
      ind2--;
    } else {
      if (ind1 > 0) ind1--;
    }
  }
  cout << A - B;
}
