#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 100;
bool cmp(long long a, long long b) { return a > b; }
long long a[MAXN];
long long b[MAXN];
int n, m;
long long sumA = 0, sumB = 0;
long long solve1() {
  long long ans = sumA;
  for (int i = 1; i < m; i++) {
    ans += min(b[i], sumA);
  }
  return ans;
}
long long solve2() { return sumA - a[0] + sumB; }
long long solve3() {
  long long ans = sumB;
  for (int i = 1; i < n; i++) {
    ans += min(a[i], sumB);
  }
  return ans;
}
long long solve4() { return sumB - b[0] + sumA; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%I64I64d", a + i);
    sumA += a[i];
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", b + i);
    sumB += b[i];
  }
  sort(a, a + n, cmp);
  sort(b, b + m, cmp);
  long long ans = 1000000000000000000LL;
  ans = min(ans, solve1());
  ans = min(ans, solve2());
  ans = min(ans, solve3());
  ans = min(ans, solve4());
  printf("%I64d\n", ans);
  return 0;
}
