#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
const int mod = 1e9;
int N, M, Q, K;
vector<long long> A, B;
int main() {
  int i, j, k;
  long long num;
  scanf("%d", &N);
  for (i = 1; i <= N; ++i) {
    scanf("%lld", &num);
    A.push_back(num);
  }
  for (i = 1; i <= N; ++i) {
    scanf("%lld", &num);
    B.push_back(num);
  }
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  long long sum1, sum2;
  sum1 = sum2 = 0;
  while (1) {
    if (A.empty() && B.empty()) break;
    if (A.empty()) {
      B.pop_back();
    } else {
      if (B.empty() || A.back() > B.back()) {
        sum1 += A.back();
        A.pop_back();
      } else {
        B.pop_back();
      }
    }
    if (A.empty() && B.empty()) break;
    if (B.empty()) {
      A.pop_back();
    } else {
      if (A.empty() || B.back() > A.back()) {
        sum2 += B.back();
        B.pop_back();
      } else {
        A.pop_back();
      }
    }
  }
  printf("%lld\n", sum1 - sum2);
}
