#include <bits/stdc++.h>
using namespace std;
void solve() {}
const long long maxn = 100500;
long long n, m;
long long a[maxn], b[maxn];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= m; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  if (a[n] < b[m]) {
    for (long long i = 1; i <= max(n, m); i++) {
      swap(a[i], b[i]);
    }
    swap(n, m);
  }
  long long sum = 0;
  for (long long i = 1; i <= m; i++) {
    sum += b[i];
  }
  long long ans = sum;
  for (long long i = 1; i <= n - 1; i++) {
    ans += min(sum, a[i]);
  }
  cout << ans << '\n';
}
