#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 60;
long long n, A[2];
pair<long long, long long> a[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a[i] = {x, 0};
  }
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a[n + i] = {x, 1};
  }
  sort(a, a + 2 * n);
  reverse(a, a + 2 * n);
  for (int i = 0; i < 2 * n; ++i) {
    if (a[i].second == (i & 1)) A[i & 1] += a[i].first;
  }
  cout << A[0] - A[1] << endl;
  return 0;
}
