#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long n, arr[N], brr[N];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int x = 1; x <= n; x++) {
    cin >> arr[x];
  }
  for (int x = 1; x <= n; x++) {
    cin >> brr[x];
  }
  sort(arr + 1, arr + n + 1);
  sort(brr + 1, brr + n + 1);
  int na = n;
  int nb = n;
  long long ansa = 0;
  long long ansb = 0;
  for (int x = 1; x <= n; x++) {
    if (na == 0) {
      nb--;
    } else if (arr[na] > brr[nb]) {
      ansa += arr[na];
      na--;
    } else {
      nb--;
    }
    if (nb == 0) {
      na--;
    } else if (brr[nb] > arr[na]) {
      ansb += brr[nb];
      nb--;
    } else {
      na--;
    }
  }
  printf("%lld\n", ansa - ansb);
}
