#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, m, a[N], b[N];
void solve(long long a[], long long n, long long b[], long long m) {
  long long ans = 0, sum = 0;
  for (long long i = 0; i < m; i++) sum += b[i], ans += b[i];
  for (long long i = 0; i < n - 1; i++) ans += min(sum, a[i]);
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + m);
  if (a[n - 1] >= b[m - 1])
    solve(a, n, b, m);
  else
    solve(b, m, a, n);
}
