#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n, m;
  cin >> n >> m;
  vector<long long int> a(n), b(m);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  for (long long int i = 0; i < m; i++) cin >> b[i];
  sort(a.begin(), a.end());
  sort(b.begin(), b.end(), greater<long long int>());
  long long int ans = 0;
  for (long long int i = 0; i < min(n, m) and a[i] < b[i]; i++)
    ans += (b[i] - a[i]);
  cout << ans << "\n";
  return 0;
}
