#include <bits/stdc++.h>
using namespace std;
priority_queue<long long> a, b;
int main() {
  long long n;
  cin >> n;
  a.push(0);
  b.push(0);
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    a.push(x);
  }
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    b.push(x);
  }
  long long ans = 0;
  for (long long i = 0; i < n; ++i) {
    if (a.top() < b.top())
      b.pop();
    else {
      ans += a.top();
      a.pop();
    }
    if (a.top() < b.top()) {
      ans -= b.top();
      b.pop();
    } else
      a.pop();
  }
  cout << ans << '\n';
}
