#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<long long int> a(n), b(m);
  for (long long int &x : a) cin >> x;
  for (long long int &x : b) cin >> x;
  sort(a.begin(), a.end());
  sort(b.rbegin(), b.rend());
  long long int ans = 0;
  for (int i = 0; i < min(n, m); i++) {
    if (a[i] >= b[i]) break;
    ans += b[i] - a[i];
  }
  cout << ans;
  return 0;
}
