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