#include <bits/stdc++.h>
using namespace std;
int n, m, a[100005], b[100005];
bool cmp(int x, int y) { return x > y; }
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m, cmp);
  if (n > m) n = m;
  long long ans = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] < b[i]) ans += b[i] - a[i];
  printf("%lld\n", ans);
  return 0;
}
