#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n], 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 val1 = 0, val2 = 0;
  for (long long i = n - 1, j = n - 1; i >= 0 || j >= 0;) {
    if (i < 0) {
      j--;
    } else if (a[i] > b[j] || j < 0) {
      val1 += a[i];
      i--;
    } else {
      j--;
    }
    if (j < 0) {
      i--;
    } else if (b[j] > a[i] || i < 0) {
      val2 += b[j];
      j--;
    } else {
      i--;
    }
  }
  cout << val1 - val2;
  return 0;
}
