#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long a[maxn], b[maxn];
int main() {
  int m, n;
  scanf("%d %d", &n, &m);
  long long suma = 0, sumb = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", a + i);
    suma += a[i];
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= m; ++i) {
    scanf("%lld", b + i);
    sumb += b[i];
  }
  sort(b + 1, b + 1 + m);
  long long t1 = sumb, t2 = suma;
  for (int i = 1; i <= n - 1; i++) t1 += min(sumb, a[i]);
  for (int i = 1; i <= m - 1; i++) t2 += min(suma, b[i]);
  printf("%lld\n", min(t1, t2));
  return 0;
}
