#include <bits/stdc++.h>
using namespace std;
unsigned long long N, M, SA, SB, A[100005], B[100005];
unsigned long long solve(unsigned long long a[], unsigned long long b[],
                         unsigned long long n, unsigned long long m) {
  sort(a + 1, a + n + 1);
  unsigned long long acc = 0, ret = ULLONG_MAX, s = 0;
  for (unsigned long long i = (1); i <= (m); i++) s += b[i];
  for (unsigned long long i = (1); i <= (n); i++)
    ret = min(ret, s * (n - i + 1) + acc), acc += a[i];
  return ret;
}
int main() {
  cin >> N >> M;
  for (unsigned long long i = (1); i <= (N); i++) cin >> A[i];
  for (unsigned long long i = (1); i <= (M); i++) cin >> B[i];
  unsigned long long x1 = solve(A, B, N, M);
  unsigned long long x2 = solve(B, A, M, N);
  cout << min(x1, x2);
}
