#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1) * 4;
const int N = 7e3 + 5;
const double EPS = 1e-9;
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> A(n), B(m);
  for (int i = 0; i < (int)n; ++i) {
    cin >> A[i];
  }
  for (int i = 0; i < (int)m; ++i) {
    cin >> B[i];
  }
  sort(A.begin(), A.end());
  reverse(A.begin(), A.end());
  sort(B.begin(), B.end());
  reverse(B.begin(), B.end());
  if (A[0] < B[0]) {
    swap(A, B);
    swap(n, m);
  }
  long long sum = 0, ans = 0;
  for (int i = 0; i < (int)m; ++i) {
    sum += B[i];
  }
  ans += sum;
  for (long long i = 1; i <= n - 1; ++i) {
    if (A[i] > sum) {
      ans += sum;
    } else {
      ans += A[i];
    }
  }
  cout << ans << endl;
}
