#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n;
  priority_queue<int> a, b;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push(x);
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    b.push(x);
  }
  long long as = 0, bs = 0;
  for (int i = 0; i < n; i++) {
    int max_a = -1, max_b = -1;
    if (!a.empty()) max_a = a.top();
    if (!b.empty()) {
      max_b = b.top();
    }
    if (max_a > max_b) {
      as += max_a;
      a.pop();
    } else {
      b.pop();
    }
    max_a = -1;
    max_b = -1;
    if (!a.empty()) max_a = a.top();
    if (!b.empty()) {
      max_b = b.top();
    }
    if (max_b > max_a) {
      bs += max_b;
      b.pop();
    } else {
      a.pop();
    }
  }
  cout << as - bs;
  return 0;
}
