#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, t;
  scanf("%d %d", &n, &m);
  vector<int> a, b;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    a.push_back(t);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &t);
    b.push_back(t);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  long long ans = 0LL;
  for (int i = 0; i < min(n, m); i++) {
    if (a[i] > b[i]) {
      break;
    }
    ans += (b[i] - a[i]);
  }
  cout << ans << "\n";
}
