#include <bits/stdc++.h>
using namespace std;
int N, M;
long long V[100005];
long long R[100005];
void read_vector(long long *v, int n) {
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
}
int main() {
  int T;
  int N, M;
  cin >> N >> M;
  read_vector(V, N);
  read_vector(R, M);
  sort(V, V + N);
  sort(R, R + M);
  reverse(R, R + M);
  long long answer = 0;
  for (int i = 0; i < min(N, M) && V[i] < R[i]; i++) {
    answer += (R[i] - V[i]);
  }
  cout << answer << endl;
  return 0;
}
