#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int a[N], b[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  long long A, B;
  int pos_a, pos_b;
  pos_a = pos_b = n;
  A = B = 0;
  for (int i = 1; i <= n; i++) {
    if (a[pos_a] > b[pos_b]) {
      A += a[pos_a--];
    } else {
      pos_b--;
    }
    if (b[pos_b] > a[pos_a]) {
      B += b[pos_b--];
    } else
      pos_a--;
  }
  printf("%lld\n", A - B);
  return 0;
}
