#include <bits/stdc++.h>
using namespace std;
const int Z = (int)5e5 + 111;
const int inf = (int)1e9 + 111;
const long long llinf = (long long)1e18 + 5;
const int MOD = (int)1e9 + 7;
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  multiset<int, greater<int> > s1, s2;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    s1.insert(x);
  }
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    s2.insert(x);
  }
  long long score = 0;
  for (int i = 1; i <= 2 * n; ++i) {
    if (i % 2) {
      if (!s2.empty() && *s2.begin() > *s1.begin()) {
        s2.erase(s2.begin());
      } else {
        score += *s1.begin();
        s1.erase(s1.begin());
      }
    } else {
      if (!s1.empty() && *s1.begin() > *s2.begin()) {
        s1.erase(s1.begin());
      } else {
        score -= *s2.begin();
        s2.erase(s2.begin());
      }
    }
  }
  cout << score;
  return 0;
}
