#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n;
  priority_queue<int> First;
  priority_queue<int> Second;
  for (int i = 0; i < n; i++) {
    cin >> a;
    First.push(a);
  }
  for (int i = 0; i < n; i++) {
    cin >> b;
    Second.push(b);
  }
  First.push(0);
  Second.push(0);
  long long int f_sum = 0, s_sum = 0;
  for (int i = 1;; i++) {
    if (i % 2 != 0) {
      if (First.top() >= Second.top()) {
        f_sum += First.top();
        First.pop();
      } else if (First.top() < Second.top()) {
        Second.pop();
      }
    } else if (i % 2 == 0 and i != 1) {
      if (First.top() <= Second.top()) {
        s_sum += Second.top();
        Second.pop();
      } else if (First.top() > Second.top()) {
        First.pop();
      }
    }
    if (Second.top() == 0 and First.top() == 0) {
      break;
    }
  }
  cout << f_sum - s_sum << endl;
  return 0;
}
