#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  vector<int> B(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int j = 0; j < n; j++) cin >> B[j];
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  int x = n - 1;
  int y = n - 1;
  long long sx = 0, sy = 0;
  int ok = 1;
  while (x >= 0 || y >= 0) {
    if (ok) {
      if (x < 0) {
        y--;
        ok = 0;
        continue;
      }
      if (y < 0) {
        sx += A[x];
        x--;
        ok = 0;
        continue;
      }
      if (A[x] < B[y]) {
        y--;
      } else {
        sx += A[x];
        x--;
      }
    } else {
      if (y < 0) {
        x--;
        ok = 1;
        continue;
      }
      if (x < 0) {
        sy += B[y];
        y--;
        ok = 1;
        continue;
      }
      if (A[x] > B[y]) {
        x--;
      } else {
        sy += B[y];
        y--;
      }
    }
    ok ^= 1;
  }
  cout << (sx - sy) << endl;
}
