#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(0);
  long long n, score = 0, x;
  bool turn = 0;
  std::vector<long long> a, b;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::cin >> x;
    a.push_back(x);
  }
  for (int i = 0; i < n; i++) {
    std::cin >> x;
    b.push_back(x);
  }
  std::sort(a.begin(), a.end());
  std::sort(b.begin(), b.end());
  while (!(a.size() == 0 && b.size() == 0)) {
    if (turn == 0) {
      if (b.size() != 0) {
        if (a.size() != 0) {
          if (a[a.size() - 1] <= b[b.size() - 1]) {
            b.pop_back();
            turn = 1;
          } else {
            score += a[a.size() - 1];
            a.pop_back();
            turn = 1;
          }
        } else {
          b.pop_back();
          turn = 1;
        }
      } else {
        score += a[a.size() - 1];
        a.pop_back();
        turn = 1;
      }
    } else {
      if (a.size() != 0) {
        if (b.size() != 0) {
          if (b[b.size() - 1] <= a[a.size() - 1]) {
            a.pop_back();
            turn = 0;
          } else {
            score -= b[b.size() - 1];
            b.pop_back();
            turn = 0;
          }
        } else {
          a.pop_back();
          turn = 0;
        }
      } else {
        score -= b[b.size() - 1];
        b.pop_back();
        turn = 0;
      }
    }
  }
  std::cout << score << std::endl;
  return 0;
}
