#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 7;
long long a[maxn];
long long b[maxn];
int32_t main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  sort(a, a + n);
  sort(b, b + n);
  long long i = n - 1, j = n - 1;
  bool p = 0;
  long long ans1 = 0, ans2 = 0;
  while (i >= 0 || j >= 0) {
    if (i < 0) {
      if (p == 0) {
        j--;
        p = !p;
      } else {
        ans2 += b[j];
        j--;
        p = !p;
      }
    } else if (j < 0) {
      if (p == 0) {
        ans1 += a[i];
        i--;
        p = !p;
      } else {
        i--;
        p = !p;
      }
    } else {
      if (p == 0) {
        if (a[i] >= b[j]) {
          ans1 += a[i];
          i--;
          p = !p;
        } else {
          j--;
          p = !p;
        }
      } else {
        if (b[j] >= a[i]) {
          ans2 += b[j];
          j--;
          p = !p;
        } else {
          i--;
          p = !p;
        }
      }
    }
  }
  cout << ans1 - ans2 << endl;
}
