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