#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const unsigned long long LLINF = 2e18;
const int maxN = 1e5;
unsigned long long solve(vector<unsigned long long> A,
                         vector<unsigned long long> B) {
  int na = A.size(), nb = B.size();
  unsigned long long a_sum = 0;
  for (unsigned long long a : A) a_sum += a;
  unsigned long long ans = LLINF;
  unsigned long long prev = 0;
  for (int i = 0; i < nb; i++) {
    ans = min(ans, prev + a_sum * (nb - i));
    prev += B[i];
  }
  return ans;
}
int main() {
  int na, nb;
  scanf("%d %d", &na, &nb);
  vector<unsigned long long> A(na), B(nb);
  for (int i = 0; i < na; i++) {
    scanf("%lld", &A[i]);
  }
  for (int i = 0; i < nb; i++) {
    scanf("%lld", &B[i]);
  }
  sort(A.begin(), A.end()), sort(B.begin(), B.end());
  unsigned long long ans = min(solve(A, B), solve(B, A));
  printf("%lld\n", ans);
  return 0;
}
