#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  long long sm1 = 0, sm2 = 0, ans = 0;
  int k = 0, i = 0, j = 0;
  while (k < 2 * n) {
    if (k % 2 == 0) {
      if (i < n and j < n) {
        if (a[i] >= b[j]) {
          sm1 += a[i];
          i++;
        } else
          j++;
      } else if (i < n) {
        sm1 += a[i];
        i++;
      } else
        j++;
    } else {
      if (i < n and j < n) {
        if (a[i] <= b[j]) {
          sm2 += b[j];
          j++;
        } else
          i++;
      } else if (j < n) {
        sm2 += b[j];
        j++;
      } else
        i++;
    }
    k++;
  }
  cout << sm1 - sm2 << endl;
  return 0;
}
