#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn], b[maxn];
long long sum = 0;
bool cmp(int a, int b) { return a >= b; }
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  sort(a, a + n);
  sort(b, b + m, cmp);
  for (int i = 0; i < min(n, m); i++) {
    int k = b[i] - a[i];
    if (k > 0)
      sum += (long long)k;
    else
      break;
  }
  cout << sum << endl;
  return 0;
}
