#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const bool debugger1 = 0;
const bool debugger2 = 0;
const bool debugger3 = 0;
const bool debugger4 = 0;
const bool debugger5 = 0;
const long long MOD = 1e9 + 7, P = 1e9 + 7;
long long n;
long long sca, scb;
std::vector<pair<long long, long long> > liczby;
int main() {
  scanf("%lld", &n);
  liczby.resize(2 * n);
  for (int i = 0; i < n; i++)
    scanf("%lld", &liczby[i].first), liczby[i].second = 1;
  for (int i = 0; i < n; i++)
    scanf("%lld", &liczby[n + i].first), liczby[n + i].second = 2;
  for (int i = 0; i < 2 * n; i++) liczby[i].first *= (-1);
  sort(liczby.begin(), liczby.end());
  for (int i = 0; i < liczby.size(); i++) {
    if (liczby[i].second == 1) {
      if (i % 2 == 0) sca -= liczby[i].first;
    } else if (i % 2 == 1)
      scb -= liczby[i].first;
  }
  printf("%lld", sca - scb);
  return 0;
}
