#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int arr[maxn];
int arr1[maxn];
void solve() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i <= n - 1; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 0; i <= n - 1; i++) {
    scanf("%d", &arr1[i]);
  }
  sort(arr, arr + n, greater<int>());
  sort(arr1, arr1 + n, greater<int>());
  int start1 = 0, start2 = 0;
  bool turn = 0;
  long long int scoreA = 0;
  long long int scoreB = 0;
  while (start1 < n and start2 < n) {
    if (!turn) {
      if (arr[start1] >= arr1[start2]) {
        scoreA += arr[start1++];
      } else {
        start2++;
      }
      turn = !turn;
    } else {
      if (arr1[start2] >= arr[start1]) {
        scoreB += arr1[start2++];
      } else {
        start1++;
      }
      turn = !turn;
    }
  }
  while (start1 < n or start2 < n) {
    if (!turn) {
      if (start1 < n) {
        scoreA += arr[start1++];
      } else {
        start2++;
      }
      turn = !turn;
    } else {
      if (start2 < n) {
        scoreB += arr1[start2++];
      } else {
        start1++;
      }
      turn = !turn;
    }
  }
  printf("%lld\n", scoreA - scoreB);
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
