#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  long long sum = 0;
  sort(a, a + n);
  sort(b, b + n);
  int i = n - 1, j = n - 1;
  int ctr = 1;
  while (i != -1 && j != -1) {
    if (ctr % 2) {
      if (a[i] >= b[j]) {
        sum += a[i];
        i--;
      } else if (b[j] > a[i]) {
        j--;
      }
    } else {
      if (b[j] >= a[i]) {
        sum -= b[j];
        j--;
      } else if (a[i] > b[j]) {
        i--;
      }
    }
    ctr++;
  }
  if (ctr % 2)
    j--;
  else
    i--;
  while (i > -1) {
    sum += a[i];
    i -= 2;
  }
  while (j > -1) {
    sum -= b[j];
    j -= 2;
  }
  cout << sum;
}
