#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  scanf("%d", &n);
  multiset<int> mseA, mseB;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    mseA.insert(x);
  }
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    mseB.insert(x);
  }
  ll res = 0;
  bool turn = false;
  while (true) {
    if (mseA.empty()) break;
    if (mseB.empty()) break;
    int x = *mseA.rbegin();
    int y = *mseB.rbegin();
    if (x > y) {
      res += x;
      mseA.erase(mseA.find(x));
    } else
      mseB.erase(mseB.find(y));
    turn ^= 1;
    if (mseA.empty()) break;
    if (mseB.empty()) break;
    x = *mseA.rbegin();
    y = *mseB.rbegin();
    if (x < y) {
      res -= y;
      mseB.erase(mseB.find(y));
    } else
      mseA.erase(mseA.find(x));
    turn ^= 1;
  }
  while (!mseA.empty()) {
    if (!turn) res += *mseA.rbegin();
    mseA.erase(mseA.find(*mseA.rbegin()));
    turn ^= 1;
  }
  while (!mseB.empty()) {
    if (turn) res -= *mseB.rbegin();
    mseB.erase(mseB.find(*mseB.rbegin()));
    turn ^= 1;
  }
  cout << res << "\n";
  return 0;
}
