#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int a[maxn];
int b[maxn];
int n, m;
int main() {
  while (cin >> n >> m) {
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> b[i];
    sort(a, a + n);
    sort(b, b + m, greater<int>());
    n = min(n, m);
    long long ans = 0;
    for (int i = 0; i < n; i++) {
      if (b[i] > a[i]) ans += (long long)b[i] - a[i];
    }
    cout << ans << endl;
  }
  return 0;
}
