#include <bits/stdc++.h>
using namespace std;
int turn_on_bit(int x, int pos) {
  x |= (1 << pos);
  return x;
}
int turn_off_bit(int x, int pos) {
  x &= ~(1 << pos);
  return x;
}
bool turned_on_bit(int x, int pos) { return ((x & (1 << pos)) != 0); }
int flip_bit(int x, int pos) {
  x ^= (1 << pos);
  return x;
}
int lsb(int x) { return x & (-x); }
int turn_on_bit_all(int x, int pos) {
  x = (1 << pos) - 1;
  return x;
}
const double EPS = 1e-9;
const double PI = 2 * acos(0.0);
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int dx1[] = {0, 1, 0, -1};
const int dy1[] = {1, 0, -1, 0};
const int dx2[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy2[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int n;
int a[123456], b[123456];
bool cmp(int a, int b) { return a > b; }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)n; i++) scanf("%d", a + i);
  for (int i = 0; i < (int)n; i++) scanf("%d", b + i);
  sort(a, a + n, cmp);
  sort(b, b + n, cmp);
  int a_ptr = 0, b_ptr = 0;
  long long a_score = 0, b_score = 0;
  int turn = 1;
  while (a_ptr < n && b_ptr < n) {
    if (turn == 1) {
      if (a[a_ptr] > b[b_ptr]) {
        a_score += a[a_ptr];
        a_ptr++;
      } else {
        b_ptr++;
      }
    } else {
      if (b[b_ptr] > a[a_ptr]) {
        b_score += b[b_ptr];
        b_ptr++;
      } else {
        a_ptr++;
      }
    }
    turn = (turn == 1 ? 2 : 1);
  }
  if (turn == 2)
    a_ptr++;
  else if (turn == 1)
    b_ptr++;
  while (a_ptr < n) {
    a_score += a[a_ptr];
    a_ptr += 2;
  }
  while (b_ptr < n) {
    b_score += b[b_ptr];
    b_ptr += 2;
  }
  printf("%lld\n", (a_score - b_score));
  return 0;
}
