#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
int a[N], b[N];
int32_t main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1);
  reverse(a + 1, a + n + 1);
  reverse(b + 1, b + n + 1);
  bool p = 0;
  int i = 1, j = 1, moves = 0;
  long long sum = 0;
  while (moves < 2 * n) {
    moves++;
    if (!p) {
      if (a[i] >= b[j]) {
        sum += a[i];
        i++;
      } else
        j++;
    } else {
      if (b[j] >= a[i]) {
        sum -= b[j];
        j++;
      } else
        i++;
    }
    p = !p;
  }
  cout << sum;
  return 0;
}
