#include <bits/stdc++.h>
using namespace std;
string tostring(long long n) {
  ostringstream ss;
  ss << n;
  return ss.str();
}
long long tonumber(string str) {
  stringstream ss;
  ss << str;
  long long n;
  ss >> n;
  return n;
}
long long n, m, res, tmp;
int main() {
  while (cin >> n >> m) {
    vector<long long> arr1(n), arr2(m);
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      arr1[i] = x;
    }
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      arr2[i] = x;
    }
    sort(arr1.begin(), arr1.end());
    sort(arr2.rbegin(), arr2.rend());
    tmp = min(n, m), res = 0;
    for (int i = 0; i < tmp; i++) {
      if (arr1[i] > arr2[i]) break;
      if (arr1[i] - arr2[i] > 0)
        res += arr1[i] - arr2[i];
      else
        res += (arr1[i] - arr2[i]) * -1;
    }
    cout << res << endl;
  }
}
