#include <bits/stdc++.h>
using namespace std;
void test_case() {
  int n, m;
  cin >> n >> m;
  vector<unsigned long long> v1(n), v2(m);
  for (auto &x : v1) cin >> x;
  for (auto &x : v2) cin >> x;
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());
  unsigned long long best = numeric_limits<unsigned long long>::max();
  unsigned long long sum = 0, pref = 0;
  for (auto &x : v1) sum += x;
  for (unsigned long long i = 0; i < m; i++) {
    best = min(best, sum * (m - i) + pref);
    pref += v2[i];
  }
  sum = pref;
  pref = 0;
  for (unsigned long long i = 0; i < n; i++) {
    best = min(best, sum * (n - i) + pref);
    pref += v1[i];
  }
  cout << best << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    test_case();
  }
  return 0;
}
