#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  long long sum1 = 0, sum2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum1 += a[i];
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    sum2 += b[i];
  }
  long long suma = 0, sumb = 0;
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  for (int i = 1; i < m; i++) {
    if (b[i] > sum1) {
      sumb += sum1;
    } else
      sumb += b[i];
  }
  sumb += sum1;
  for (int i = 1; i < n; i++) {
    if (a[i] > sum2) {
      suma += sum2;
    } else
      suma += a[i];
  }
  suma += sum2;
  printf("%lld\n", min(suma, sumb));
}
