#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 9;
long long a[MAX], b[MAX], n, m, s1, s2, r1, r2;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i], s1 += a[i];
  for (int i = 0; i < m; i++) cin >> b[i], s2 += b[i];
  sort(a, a + n), sort(b, b + m);
  for (int i = 0; i < n - 1; i++) r1 += min(s2, a[i]);
  for (int i = 0; i < m - 1; i++) r2 += min(s1, b[i]);
  cout << min(r1 + s2, r2 + s1);
  return 0;
}
