#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
int n, m;
long long a[N], b[N];
int main() {
  scanf("%d%d", &n, &m);
  long long sumA = 0, sumB = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", a + i);
    sumA += a[i];
  }
  for (int i = 0; i < m; i++) {
    scanf("%lld", b + i);
    sumB += b[i];
  }
  sort(a, a + n);
  reverse(a, a + n);
  sort(b, b + m);
  reverse(b, b + m);
  long long ansA = sumB, ansB = sumA;
  for (int i = 1; i < n; i++) ansA += min(a[i], sumB);
  for (int i = 1; i < m; i++) ansB += min(b[i], sumA);
  printf("%lld\n", min(ansA, ansB));
  return 0;
}
