#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const int N = 1E5 + 4;
int a[N], b[N];
int main() {
  fast();
  int n, m;
  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);
  reverse(b, b + m);
  long long diff = 0;
  for (int i = 0; (i < n && i < m); ++i) {
    if (a[i] > b[i]) break;
    diff += b[i] - a[i];
  }
  cout << diff << "\n";
}
