#include <cstdio>
#include <algorithm>

using namespace std;

typedef long long ll;

int w, h;
ll p[111111], q[111111];

int main(void) {
  scanf("%d%d", &w, &h);
  for (int i = 0; i < w; i++) scanf("%lld", p+i);
  for (int i = 0; i < h; i++) scanf("%lld", q+i);
  sort(p, p+w);
  sort(q, q+h);

  int a, b;
  int ww = w+1;
  int hh = h+1;
  ll res = 0;
  a = 0;
  b = 0;
  for (int i = 0; i < w+h; i++) {
    // printf("%d %d %d %d %lld\n", ww, hh, a, b, res);
    if (a == w || (b < h && p[a] > q[b])) {
      res += q[b]*ww;
      --hh;
      ++b;
    } else {
      res += p[a]*hh;
      --ww;
      ++a;
    }
  }
  printf("%lld\n", res);
  return 0;
}
