#include <bits/stdc++.h>
using namespace std;
unsigned long long n, m, res, res1, res2,
    A[100005] = {0}, B[100005] = {0}, a[100005] = {0}, b[100005] = {0}, temp,
    ta = 0, tb = 0;
int main() {
  res = res1 = res2 = 2e14 + 5;
  cin >> m >> n;
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
    ta += a[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
    tb += b[i];
  }
  sort(a, a + m);
  sort(b, b + n);
  res1 = tb;
  for (int i = 0; i < m - 1; ++i) {
    res1 += min(a[i], tb);
  }
  res2 = ta;
  for (int i = 0; i < n - 1; ++i) {
    res2 += min(b[i], ta);
  }
  res = min(res2, res1);
  res = min(res, tb * m);
  res = min(res, ta * n);
  cout << res << endl;
  return 0;
}
