#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
int m, t, r, w[maxn];
int s[maxn];
int vis[maxn];
long long a[maxn];
long long b[maxn];
long long ans = 0;
bool cmp(long long x, long long y) { return x > y; }
int main() {
  int n, k;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n, cmp);
  sort(b, b + n, cmp);
  int i = 0, j = 0;
  int flag = 0;
  long long ans1 = 0, ans2 = 0;
  int cnt1 = n, cnt2 = n;
  while (i < cnt1 || j < cnt2) {
    if (flag == 0) {
      if (i == cnt1) {
        j++;
      } else if (j == cnt2) {
        ans1 += a[i++];
      } else if (a[i] > b[j])
        ans1 += a[i], i++;
      else
        j++;
      flag = 1;
    } else {
      if (i == cnt1) {
        ans2 += b[j++];
      } else if (j == cnt2) {
        i++;
      } else if (a[i] < b[j])
        ans2 += b[j], j++;
      else
        i++;
      flag = 0;
    }
  }
  cout << ans1 - ans2 << endl;
  return 0;
}
