#include <bits/stdc++.h>
using namespace std;
const int MXN = 1e5 + 5;
int main() {
  long long n, A[MXN] = {0}, B[MXN] = {0}, a = 0, b = 0;
  cin >> n;
  long long cnta = n, cntb = n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  for (int i = 1; i <= n; i++) cin >> B[i];
  sort(A, A + n + 1);
  sort(B, B + n + 1);
  while (true) {
    if (A[cnta] >= B[cntb]) {
      a += A[cnta];
      cnta--;
    } else
      cntb--;
    if (B[cntb] >= A[cnta]) {
      b += B[cntb];
      cntb--;
    } else
      cnta--;
    if (cnta <= 0 && cntb <= 0) break;
  }
  cout << a - b << "\n";
  return 0;
}
