#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int a[N], b[N];
long long k, l, ans, sum, k1, l1;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    k += a[i];
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    l += b[i];
  }
  sort(a, a + n);
  sort(b, b + m);
  int i = m - 1;
  l1 = l;
  for (i = m - 1; i >= 0 && b[i] > k; i--) l1 -= b[i];
  if (i < m - 1)
    i++;
  else
    l1 -= b[m - 1];
  sum = (long long)(m - i) * k + l1;
  k1 = k;
  for (i = n - 1; i >= 0 && a[i] > l; i--) k1 -= a[i];
  if (i < n - 1)
    i++;
  else
    k1 -= a[n - 1];
  ans = (n - i) * l + k1;
  printf("%I64d", min(ans, sum));
  return 0;
}
