#include <bits/stdc++.h>
using namespace std;
long long p[1 << 17], p1[1 << 17];
long long sum = 0, sum1 = 0;
int n, m;
bool compar(long long x, long long y) { return x > y; }
int main() {
  cin >> n >> m;
  long long x;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", p + i);
    sum += p[i];
  }
  for (int i = 0; i < m; ++i) {
    scanf("%I64d", p1 + i);
    sum1 += p1[i];
  }
  sort(p, p + n, compar);
  sort(p1, p1 + m, compar);
  long long ans = sum1, ans1 = sum;
  for (int i = 1; i < n; ++i) {
    ans += min(p[i], sum1);
  }
  for (int i = 1; i < m; ++i) ans1 += min(p1[i], sum);
  cout << min(ans, ans1);
}
