#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int m, n;
int a[N], mx;
long long sum1, sum2;
int main() {
  scanf("%d%d", &m, &n);
  int mx = 0, now;
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &a[i]);
    sum1 += (long long)a[i];
    if (a[i] > mx) mx = a[i], now = i;
  }
  for (int i = m + 1; i <= m + n; ++i) {
    scanf("%d", &a[i]);
    sum2 += (long long)a[i];
    if (a[i] > mx) mx = a[i], now = i;
  }
  long long ans2 = 0;
  if (now <= m) {
    ans2 = sum2;
    for (int i = 1; i <= m; ++i)
      if (i != now) {
        ans2 += min((long long)a[i], sum2);
      }
  } else {
    ans2 = sum1;
    for (int i = m + 1; i <= m + n; ++i)
      if (i != now) {
        ans2 += min((long long)a[i], sum1);
      }
  }
  cout << ans2 << endl;
  return 0;
}
