#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<long long> a(n), b(m);
  for (int i = (0), ThxMK = (n); i < ThxMK; ++i) cin >> a[i];
  for (int i = (0), ThxMK = (m); i < ThxMK; ++i) cin >> b[i];
  long long A = *max_element(begin(a), end(a));
  long long B = *max_element(begin(b), end(b));
  long long sum = 0, S = 0;
  if (A > B) {
    for (int i = (0), ThxMK = (m); i < ThxMK; ++i) sum += b[i];
    S += sum;
    for (int i = (0), ThxMK = (n); i < ThxMK; ++i) S += min(sum, a[i]);
    S -= min(sum, A);
  } else {
    for (int i = (0), ThxMK = (n); i < ThxMK; ++i) sum += a[i];
    S += sum;
    for (int i = (0), ThxMK = (m); i < ThxMK; ++i) S += min(sum, b[i]);
    S -= min(sum, B);
  }
  cout << S << '\n';
}
