#include <bits/stdc++.h>
using namespace std;
long long min(long long a, long long b) { return (a < b ? a : b); }
long long max(long long a, long long b) { return (a > b ? a : b); }
long long MOD = 1000000007;
const int MAX = 1000000;
int main() {
  long long n = 0, m = 0, i = 0, x, k = 0, count = 1, index = 0, j = 0, res = 0,
            p = 0, q = 0, sum1 = 0, sum = 0;
  string t, h;
  vector<long long> v, v1;
  set<long long> s;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    sum = sum + x;
    v.push_back(x);
  }
  for (long long i = 0; i < n; i++) {
    cin >> x;
    sum1 = sum1 + x;
    v1.push_back(x);
  }
  i = n - 1;
  j = n - 1;
  sort(v.begin(), v.end());
  sort(v1.begin(), v1.end());
  while ((i >= 0 || j >= 0) && (k < 2 * n)) {
    if (k % 2 == 0) {
      if (i >= 0 && j >= 0) {
        if (v[i] > v1[j]) {
          p = p + v[i];
          i--;
        } else {
          j--;
        }
      } else if (i >= 0 && j < 0) {
        p = p + v[i];
        i--;
      } else if (j >= 0 && i < 0) {
        j--;
      }
    } else {
      if (i >= 0 && j >= 0) {
        if (v[i] < v1[j]) {
          q = q + v1[j];
          j--;
        } else {
          i--;
        }
      } else if (j >= 0 && i < 0) {
        q = q + v1[j];
        j--;
      } else if (i >= 0 && j < 0) {
        i--;
      }
    }
    k++;
  }
  cout << p - q << "\n";
}
