#include <bits/stdc++.h>
using namespace std;
bool cmp(long long a, long long b) { return a > b; }
int main() {
  long long n, m, counter = 0;
  cin >> n >> m;
  long long a[n], b[m];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(b, b + m, cmp), sort(a, a + n);
  for (int i = 0; i < min(m, n) && a[i] < b[i]; i++) {
    counter += (b[i] - a[i]);
  }
  cout << counter << endl;
  return 0;
}
