#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
long long a[maxn], b[maxn], sum1, sum2, ans1, ans2;
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; i++) scanf("%lld", &a[i]), sum1 += a[i];
  for (int i = 1; i <= M; i++) scanf("%lld", &b[i]), sum2 += b[i];
  ans1 = sum2;
  ans2 = sum1;
  sort(a + 1, a + N + 1);
  sort(b + 1, b + M + 1);
  for (int i = 1; i <= N - 1; i++) ans1 += min(a[i], sum2);
  for (int i = 1; i <= M - 1; i++) ans2 += min(b[i], sum1);
  printf("%lld\n", min(ans1, ans2));
  return 0;
}
