#include <bits/stdc++.h>
using namespace std;
long long ar[100000 + 10], br[100000 + 10];
int main() {
  int n, m;
  cin >> n >> m;
  long long suma = 0ll, sumb = 0ll;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    suma += ar[i];
  }
  sort(ar, ar + n);
  for (int i = 0; i < m; i++) {
    cin >> br[i];
    sumb += br[i];
  }
  sort(br, br + m);
  long long ansa = sumb, ansb = suma;
  for (int i = 0; i < n - 1; i++) ansa += min(sumb, ar[i]);
  for (int i = 0; i < m - 1; i++) ansb += min(suma, br[i]);
  cout << min(ansa, ansb) << endl;
  return 0;
}
