#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  vector<long long> a(m);
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
  }
  vector<long long> b(n);
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  if (b.back() > a.back()) {
    swap(a, b);
    swap(n, m);
  }
  long long s = accumulate(b.begin(), b.end(), 0LL);
  long long r = s;
  for (int i = m - 2; i >= 0; --i) {
    long long t = min(a[i], s);
    r += t;
  }
  cout << r << endl;
  return 0;
}
