#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cout << setprecision(8) << fixed;
  unsigned long long n, m;
  cin >> n >> m;
  multiset<unsigned long long> a;
  multiset<unsigned long long> b;
  unsigned long long sa = 0;
  unsigned long long sb = 0;
  for (unsigned long long i = 0; i < n; i++) {
    unsigned long long x;
    cin >> x;
    sa += x;
    a.insert(x);
  }
  for (unsigned long long i = 0; i < m; i++) {
    unsigned long long x;
    cin >> x;
    sb += x;
    b.insert(x);
  }
  unsigned long long resp = sa + sb;
  unsigned long long ca = 0;
  do {
    resp = min(resp, ca + sb * ((unsigned long long)a.size()));
    unsigned long long num = *a.begin();
    a.erase(a.begin());
    ca += num;
  } while (a.size() > 0);
  unsigned long long cb = 0;
  do {
    resp = min(resp, cb + sa * ((unsigned long long)b.size()));
    unsigned long long num = *b.begin();
    b.erase(b.begin());
    cb += num;
  } while (b.size() > 0);
  cout << resp << endl;
  return 0;
}
