#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
long long a[maxn], b[maxn];
int main() {
  int n;
  scanf("%d", &n);
  long long sum1 = 0;
  long long sum2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    sum1 += a[i];
  }
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &b[i]);
    sum2 += b[i];
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1);
  long long a1 = 0, b1 = 0;
  int x = n, y = n;
  while (x != 0 || y != 0) {
    if ((b[y] > a[x] && y > 0) || x <= 0)
      y--;
    else if (x > 0) {
      a1 += a[x];
      x--;
    }
    if ((a[x] > b[y] && x > 0) || y <= 0)
      x--;
    else if (y > 0) {
      b1 += b[y];
      y--;
    }
  }
  cout << (a1 - b1) << endl;
}
