#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> A(n);
  vector<int> B(n);
  for (int i = 0; i < n; i++) scanf("%d", &A[i]);
  for (int i = 0; i < n; i++) scanf("%d", &B[i]);
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  int as = n, bs = n, at = 1;
  long long a = 0, b = 0;
  while (as + bs) {
    as = A.size();
    bs = B.size();
    if (at) {
      if (!as)
        B.pop_back();
      else if (!bs)
        a += A[as - 1], A.pop_back();
      else {
        if (A[as - 1] > B[bs - 1])
          a += A[as - 1], A.pop_back();
        else
          B.pop_back();
      }
      at--;
    } else {
      if (!bs)
        A.pop_back();
      else if (!as)
        b += B[bs - 1], B.pop_back();
      else {
        if (B[bs - 1] > A[as - 1])
          b += B[bs - 1], B.pop_back();
        else
          A.pop_back();
      }
      at++;
    }
  }
  printf("%lld", a - b);
  return 0;
}
