#include <bits/stdc++.h>   using namespace std;   const int mod = 1000000007;   int main() {     long long n, a;     long long fuck = 0, fucck = 0;     cin >> n;     priority_queue<int> prio1, prio2;     for (int i = 0; i < n; ++i) {       cin >> a;       prio1.push(a);       fuck += a;     }     for (int i = 0; i < n; ++i) {       cin >> a;       prio2.push(a);       fucck += a;     }     prio1.push(-1);     prio2.push(-1);     long long sum1 = 0, sum2 = 0;     int mark = 1;     for (int i = 0; i < 2 * n; ++i) {       if (mark == 1) {         if (prio1.top() >= prio2.top()) {           fuck -= prio1.top();           sum1 += prio1.top();           prio1.pop();         } else {           fucck -= prio2.top();           prio2.pop();         }         mark = 2;       } else {         if (prio2.top() >= prio1.top()) {           fucck -= prio2.top();           sum2 += prio2.top();           prio2.pop();         } else {           fuck -= prio1.top();           prio1.pop();         }         mark = 1;       }     }     cout << (sum1 - sum2) << endl;     return 0;   }   