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