#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, szm, szn;
  long long ansm = 0, ansn = 0, allm = 0, alln = 0;
  scanf("%d%d", &m, &n);
  szm = m, szn = n;
  priority_queue<long long> pqm, pqn;
  for (int i = 1; i <= m; i++) {
    int cur;
    scanf("%d", &cur);
    pqm.push(cur);
    allm += cur;
  }
  for (int i = 1; i <= n; i++) {
    int cur;
    scanf("%d", &cur);
    pqn.push(cur);
    alln += cur;
  }
  while (szm) {
    long long cur = pqm.top();
    pqm.pop();
    long long add;
    if (szm != m) {
      add = min(alln, cur);
    } else {
      add = alln;
    }
    szm--;
    ansm += add;
  }
  while (szn) {
    long long cur = pqn.top();
    pqn.pop();
    long long add;
    if (szn != n) {
      add = min(allm, cur);
    } else {
      add = allm;
    }
    szn--;
    ansn += add;
  }
  printf("%lld\n", min(ansn, ansm));
}
