#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const int maxn = 1e5 + 5;
const int N = 1e4 + 5;
const int mod = 1e8;
int a[maxn], b[maxn], c[2 * maxn];
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
int main(void) {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    c[i] = a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
    c[i + n] = b[i];
  }
  sort(c + 1, c + 1 + m + n);
  long long tmp = c[m], ans = 0;
  for (int i = 1; i <= n; i++) ans += max(0, tmp - a[i]);
  for (int i = 1; i <= m; i++) ans += max(0, b[i] - tmp);
  cout << ans << endl;
  return 0;
}
