#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  multiset<int> A, B;
  for (int i = 0; i < n + n; ++i) {
    int x;
    scanf("%d", &x);
    if (i >= n)
      B.insert(x);
    else
      A.insert(x);
  }
  int hd = 0;
  long long pointA = 0, pointB = 0;
  while (A.size() || B.size()) {
    if (hd % 2 == 0) {
      if (A.size() && B.size()) {
        int add = *(A.rbegin());
        int del = *(B.rbegin());
        if (add >= del) {
          pointA += add;
          A.erase(A.find(add));
        } else {
          B.erase(B.find(del));
        }
      } else if (A.size() && !B.size()) {
        int add = *(A.rbegin());
        A.erase(A.find(add));
        pointA += add;
      } else {
        int del = *(B.rbegin());
        B.erase(B.find(del));
      }
    } else {
      if (A.size() && B.size()) {
        int add = *(B.rbegin());
        int del = *(A.rbegin());
        if (add >= del) {
          pointB += add;
          B.erase(B.find(add));
        } else {
          A.erase(A.find(del));
        }
      } else if (B.size() && !A.size()) {
        int add = *(B.rbegin());
        pointB += add;
        B.erase(B.find(add));
      } else {
        int del = *(A.rbegin());
        A.erase(A.find(del));
      }
    }
    ++hd;
  }
  printf("%lld", pointA - pointB);
  return 0;
}
